thanx, is there a list somewhere about (un)supported annotations ? i just figured out @size(min=, max=) doesnt seem to work either, if at the end u have to mix to much custom-validation code with validation-api, i'd better not using it
thanxOn Thu, Dec 20, 2012 at 6:29 PM, ashwin.desikan@gmail.com <ashwin.desikan@gmail.com> wrote:
not all validations are supported. email is one among them, but you can achieve email validation using regex patternexample:static String ATOM = "[a-z0-9!#$%&'*+/=?^_`{|}~-]";static String DOMAIN = "(" + ATOM + "+(\\." + ATOM + "+)*";static String IP_DOMAIN = "\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\]";@Pattern(regexp="^" + ATOM + "+(\\." + ATOM + "+)*@"+ DOMAIN+ "|"+ IP_DOMAIN+ ")$",flags={Pattern.Flag.CASE_INSENSITIVE},message="Please provide a valid eMail id")@NotEmpty(message="Email is required")abstract String getEmail();abstract void setEmail(String email);~Ashwin--On Thu, Dec 20, 2012 at 6:39 PM, kim young ill <khiemu@googlemail.com> wrote:
well, it tooks me a while to realize that @Email doesnt work at all, allways give me Violation--On Thu, Dec 20, 2012 at 11:37 AM, kim young ill <khiemu@googlemail.com> wrote:
thanx,that worksOn Thu, Dec 20, 2012 at 4:28 AM, ashwin.desikan@gmail.com <ashwin.desikan@gmail.com> wrote:
all the validations you put on the pojo's can be applied on the proxies.example:let's say you have a pojo named guestGuest {@NotNullString name;}now the same validation you will have to apply on your proxy as well
GuestProxy {@NotNullString getName();SetName(String name);}As defined in the sample, create a validatorFactory. Instead of assigning the pojo.class use the pojoProxy.class to @GwtValidation Annotation.regardsAshwin--On Wed, Dec 19, 2012 at 1:55 PM, kim young ill <khiemu@googlemail.com> wrote:
--in the sample project of gwt-2.5, the client-pojos are annotated directly, but what about proxies ?Hi there,how can i use client-side validation with rf ?
thanx
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
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.
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
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.
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
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.
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
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.
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
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