Wednesday, October 31, 2012

Re: Cross field validation on client

Haven't tried it yet but as GWT BeanValidation has implemented the JSR303 TCK tests you should be able to create custom validation annotations and a corresponding validator.

That way you would end up having something like

@ValidPassword(repeat = "repeatPassword") //custom annotation that links to the repeat password field
String password;

@NotNull
String repeatPassword;

The validator for @ValidPassword would check against your password policies and also check the "repeatPassword" field. This should work on the server too.

-- J.



Am Dienstag, 30. Oktober 2012 12:43:57 UTC+1 schrieb Hans:
Hi,

I'm building a registration form with two password fields being validated on client side using GWT Validation framework.

Is there any constraint for doing so (validating a value against another field)? Or what's the best way to implement this (should work on server, too)?

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/iCb2kuy7SUQJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment