myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Winer" <>
Subject Re: Client Validation Design Discussion
Date Wed, 12 Jul 2006 21:48:45 GMT
On 7/12/06, Cagatay Civici <> wrote:
> Hi,
> Although I fancy the interface design first because of the flexibility,
> since enabling all of the myfaces extended validators to do validation at
> client is necessary, validatorbase still seems the better way. Validatorbase
> is also a nice place for the common client attribute. Anyway maybe a vote is
> needed for the design choice?

It's not either one or the other.  We can do both.  Create a validator
interface, *and* make ValidatorBase implement it.  What's the downside?

About the "I" prefix, yes let's forget about it.
> Also the client side converters issue, I believe client validation is more
> than the half of the picture because most of the client validators do not
> need any conversion on the input. Some examples are; required attribute,
> length, email, url, equality, regular expression, credit card, isbn. The
> ones that need conversion at client side might be range and compare.

But that overlooks all the "validation" done by converters - number
formatting and date formatting in particular.

-- Adam

By the way, these validators run only at onsubmit event of the form. I've
> also implemented simple "onkeypress validation" that allows only integers to
> be entered when there is an integeronly converter by disabling letters, or
> max-min length validation when there is a length validator. I think these
> could be very useful too, what are your thoughts on this? If we all agree,
> I'll include it too.
> Cheers
> Cagatay,

View raw message