Comments In Line.

> -----Original Message-----
> From: Niall Pemberton [mailto:[EMAIL PROTECTED]> While I was testing this I did have 
> another thought - UrlValidator just
> returns true or false when it validates and gives no indication of what bit
> of the validation failed. What do you think of changing it so it returns
> some kind of error code so that a more meaningful message could be returned
> to the user?
> 
> Something like
> 
>  Code        Condition
>     0             valid
>     101         Invalid Characters
>     102         Invalid Structure
> 
>     201         Invalid Scheme Format
>     202         Invalid Scheme Value (show valid scheme values)
> 
>     301         Invalid Authority Format
>     302         Invalid Authority IP Address
>     303         Invalid Authority Host Name
>     304         Invalid Authority - not IP Address or Hostname
>     305         Invalid Port
> 
>     401         Invalid Path Format
>     402         Invalid Path - ends with /
>     403         Invalid Path - two slashes not allowed
>     404         Invalid Path - slashes/dots
> 
>     501         Invalid Query format
> 
>     601         Fragment Not Allowed
> 
> 
> The only thing is how to configure validator to output 16 different
> messages?

Given that fits with the Validator framework, I know its implementation would be easy. 
 The grouping of error message is also nice.
Since we could use an int/long then I would probably group items by powers of two, but 
thats just a preference. If you have already created a patch with the above scheme I 
would commit it unchanged.
 
-Rob






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to