Last updated August 17, 2010 23:24, by sdouglass
Feedicon  

Supported Validations

From JSR-303:

@AssertFalse Checks if input value == 'false'
@AssertTrue Checks if input value == 'true'
@DecimalMax Checks if input value <= params.value
@DecimalMin Checks if input value >= params.value
@Digits Checks if input value has <= params.integer integer digits and <= params.fraction fraction digits
@Max Checks if input value <= params.value
@Min Checks if input value >= params.value
@NotNull Checks if input value is not empty
@Null Checks if input value is empty (this constraint doesn't really make sense when dealing with HTML forms)
@Pattern Checks if input value matches params.regexp, using optional params.flags (only 'CASE_INSENSITIVE' is supported at this time, as there are no obvious equivalents in JavaScript regular expressions for the other Java regular expression flags)
@Size Checks if input value length >= params.min and <= params.max
@Future Checks if input value is a date in the future (you must provide a simple date format in a JSON object in the body of the validate tag)
@Past Checks if input value is a date in the past (you must provide a simple date format in a JSON object in the body of the validate tag)

From Hibernate Validator:

@Email Checks if input value is a valid e-mail address using regular expressions
@Length Checks if input value.length >= params.min and <= params.max
@NotEmpty Checks if input value contains characters other than white space
@Range Checks if input value <= params.min and >= params.max
  • Mysql
  • Glassfish
  • Jruby
  • Rails
  • Nblogo
Terms of Use; Privacy Policy;
© 2014, Oracle Corporation and/or its affiliates
(revision 20160708.bf2ac18)
 
 
Close
loading
Please Confirm
Close