Java Doc for FieldChecks.java in  » Web-Framework » struts-1.3.8 » org » apache » struts » validator » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Web Framework » struts 1.3.8 » org.apache.struts.validator 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.struts.validator.FieldChecks

FieldChecks
public class FieldChecks implements Serializable(Code)

This class contains the default validations that are used in the validator-rules.xml file.

In general passing in a null or blank will return a null Object or a false boolean. However, nulls and blanks do not result in an error being added to the errors.


since:
   Struts 1.1


Field Summary
final public static  StringFIELD_TEST_EQUAL
    
final public static  StringFIELD_TEST_NOTNULL
    
final public static  StringFIELD_TEST_NULL
    


Method Summary
protected static  booleanisString(Object o)
     Return true if the specified object is a String or a null value.
public static  ObjectvalidateByte(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request)
     Checks if the field can safely be converted to a byte primitive.
Parameters:
  bean - The bean validation is being performed on.
Parameters:
  va - The ValidatorAction that is currentlybeing performed.
Parameters:
  field - The Field object associated with thecurrent field being validated.
Parameters:
  errors - The ActionMessages object to add errorsto if any validation errors occur.
Parameters:
  validator - The Validator instance, used to accessother field values.
Parameters:
  request - Current request object.
public static  ObjectvalidateByteLocale(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request)
     Checks if the field can safely be converted to a byte primitive.
Parameters:
  bean - The bean validation is being performed on.
Parameters:
  va - The ValidatorAction that is currentlybeing performed.
Parameters:
  field - The Field object associated with thecurrent field being validated.
Parameters:
  errors - The ActionMessages object to add errorsto if any validation errors occur.
Parameters:
  validator - The Validator instance, used to accessother field values.
Parameters:
  request - Current request object.
public static  ObjectvalidateCreditCard(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request)
     Checks if the field is a valid credit card number.
Parameters:
  bean - The bean validation is being performed on.
Parameters:
  va - The ValidatorAction that is currentlybeing performed.
Parameters:
  field - The Field object associated with thecurrent field being validated.
Parameters:
  errors - The ActionMessages object to add errorsto if any validation errors occur.
Parameters:
  validator - The Validator instance, used to accessother field values.
Parameters:
  request - Current request object.
public static  ObjectvalidateDate(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request)
     Checks if the field is a valid date.
public static  ObjectvalidateDouble(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request)
     Checks if the field can safely be converted to a double primitive.
Parameters:
  bean - The bean validation is being performed on.
Parameters:
  va - The ValidatorAction that is currentlybeing performed.
Parameters:
  field - The Field object associated with thecurrent field being validated.
Parameters:
  errors - The ActionMessages object to add errorsto if any validation errors occur.
Parameters:
  validator - The Validator instance, used to accessother field values.
Parameters:
  request - Current request object.
public static  ObjectvalidateDoubleLocale(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request)
     Checks if the field can safely be converted to a double primitive.
Parameters:
  bean - The bean validation is being performed on.
Parameters:
  va - The ValidatorAction that is currentlybeing performed.
Parameters:
  field - The Field object associated with thecurrent field being validated.
Parameters:
  errors - The ActionMessages object to add errorsto if any validation errors occur.
Parameters:
  validator - The Validator instance, used to accessother field values.
Parameters:
  request - Current request object.
public static  booleanvalidateDoubleRange(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request)
     Checks if a fields value is within a range (min & max specified in the vars attribute).
Parameters:
  bean - The bean validation is being performed on.
Parameters:
  va - The ValidatorAction that is currentlybeing performed.
Parameters:
  field - The Field object associated with thecurrent field being validated.
Parameters:
  errors - The ActionMessages object to add errorsto if any validation errors occur.
Parameters:
  validator - The Validator instance, used to accessother field values.
Parameters:
  request - Current request object.
public static  booleanvalidateEmail(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request)
     Checks if a field has a valid e-mail address.
Parameters:
  bean - The bean validation is being performed on.
Parameters:
  va - The ValidatorAction that is currentlybeing performed.
Parameters:
  field - The Field object associated with thecurrent field being validated.
Parameters:
  errors - The ActionMessages object to add errorsto if any validation errors occur.
Parameters:
  validator - The Validator instance, used to accessother field values.
Parameters:
  request - Current request object.
public static  ObjectvalidateFloat(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request)
     Checks if the field can safely be converted to a float primitive.
Parameters:
  bean - The bean validation is being performed on.
Parameters:
  va - The ValidatorAction that is currentlybeing performed.
Parameters:
  field - The Field object associated with thecurrent field being validated.
Parameters:
  errors - The ActionMessages object to add errorsto if any validation errors occur.
Parameters:
  validator - The Validator instance, used to accessother field values.
Parameters:
  request - Current request object.
public static  ObjectvalidateFloatLocale(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request)
     Checks if the field can safely be converted to a float primitive.
Parameters:
  bean - The bean validation is being performed on.
Parameters:
  va - The ValidatorAction that is currentlybeing performed.
Parameters:
  field - The Field object associated with thecurrent field being validated.
Parameters:
  errors - The ActionMessages object to add errorsto if any validation errors occur.
Parameters:
  validator - The Validator instance, used to accessother field values.
Parameters:
  request - Current request object.
public static  booleanvalidateFloatRange(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request)
     Checks if a fields value is within a range (min & max specified in the vars attribute).
Parameters:
  bean - The bean validation is being performed on.
Parameters:
  va - The ValidatorAction that is currentlybeing performed.
Parameters:
  field - The Field object associated with thecurrent field being validated.
Parameters:
  errors - The ActionMessages object to add errorsto if any validation errors occur.
Parameters:
  validator - The Validator instance, used to accessother field values.
Parameters:
  request - Current request object.
public static  booleanvalidateIntRange(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request)
     Checks if a fields value is within a range (min & max specified in the vars attribute).
Parameters:
  bean - The bean validation is being performed on.
Parameters:
  va - The ValidatorAction that is currentlybeing performed.
Parameters:
  field - The Field object associated with thecurrent field being validated.
Parameters:
  errors - The ActionMessages object to add errorsto if any validation errors occur.
Parameters:
  validator - The Validator instance, used to accessother field values.
Parameters:
  request - Current request object.
public static  ObjectvalidateInteger(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request)
     Checks if the field can safely be converted to an int primitive.
Parameters:
  bean - The bean validation is being performed on.
Parameters:
  va - The ValidatorAction that is currentlybeing performed.
Parameters:
  field - The Field object associated with thecurrent field being validated.
Parameters:
  errors - The ActionMessages object to add errorsto if any validation errors occur.
Parameters:
  validator - The Validator instance, used to accessother field values.
Parameters:
  request - Current request object.
public static  ObjectvalidateIntegerLocale(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request)
     Checks if the field can safely be converted to an int primitive.
Parameters:
  bean - The bean validation is being performed on.
Parameters:
  va - The ValidatorAction that is currentlybeing performed.
Parameters:
  field - The Field object associated with thecurrent field being validated.
Parameters:
  errors - The ActionMessages object to add errorsto if any validation errors occur.
Parameters:
  validator - The Validator instance, used to accessother field values.
Parameters:
  request - Current request object.
public static  ObjectvalidateLong(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request)
     Checks if the field can safely be converted to a long primitive.
Parameters:
  bean - The bean validation is being performed on.
Parameters:
  va - The ValidatorAction that is currentlybeing performed.
Parameters:
  field - The Field object associated with thecurrent field being validated.
Parameters:
  errors - The ActionMessages object to add errorsto if any validation errors occur.
Parameters:
  validator - The Validator instance, used to accessother field values.
Parameters:
  request - Current request object.
public static  ObjectvalidateLongLocale(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request)
     Checks if the field can safely be converted to a long primitive.
Parameters:
  bean - The bean validation is being performed on.
Parameters:
  va - The ValidatorAction that is currentlybeing performed.
Parameters:
  field - The Field object associated with thecurrent field being validated.
Parameters:
  errors - The ActionMessages object to add errorsto if any validation errors occur.
Parameters:
  validator - The Validator instance, used to accessother field values.
Parameters:
  request - Current request object.
public static  booleanvalidateLongRange(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request)
     Checks if a fields value is within a range (min & max specified in the vars attribute).
Parameters:
  bean - The bean validation is being performed on.
Parameters:
  va - The ValidatorAction that is currentlybeing performed.
Parameters:
  field - The Field object associated with thecurrent field being validated.
Parameters:
  errors - The ActionMessages object to add errorsto if any validation errors occur.
Parameters:
  validator - The Validator instance, used to accessother field values.
Parameters:
  request - Current request object.
public static  booleanvalidateMask(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request)
     Checks if the field matches the regular expression in the field's mask attribute.
Parameters:
  bean - The bean validation is being performed on.
Parameters:
  va - The ValidatorAction that is currentlybeing performed.
Parameters:
  field - The Field object associated with thecurrent field being validated.
Parameters:
  errors - The ActionMessages object to add errorsto if any validation errors occur.
Parameters:
  validator - The Validator instance, used to accessother field values.
Parameters:
  request - Current request object.
public static  booleanvalidateMaxLength(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request)
     Checks if the field's length is less than or equal to the maximum value.
public static  booleanvalidateMinLength(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request)
     Checks if the field's length is greater than or equal to the minimum value.
public static  booleanvalidateRequired(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request)
     Checks if the field isn't null and length of the field is greater than zero not including whitespace.
Parameters:
  bean - The bean validation is being performed on.
Parameters:
  va - The ValidatorAction that is currentlybeing performed.
Parameters:
  field - The Field object associated with thecurrent field being validated.
Parameters:
  errors - The ActionMessages object to add errorsto if any validation errors occur.
Parameters:
  validator - The Validator instance, used to accessother field values.
Parameters:
  request - Current request object.
public static  booleanvalidateRequiredIf(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request)
     Checks if the field isn't null based on the values of other fields.
Parameters:
  bean - The bean validation is being performed on.
Parameters:
  va - The ValidatorAction that is currentlybeing performed.
Parameters:
  field - The Field object associated with thecurrent field being validated.
Parameters:
  errors - The ActionMessages object to add errorsto if any validation errors occur.
Parameters:
  validator - The Validator instance, used to accessother field values.
Parameters:
  request - Current request object.
public static  ObjectvalidateShort(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request)
     Checks if the field can safely be converted to a short primitive.
Parameters:
  bean - The bean validation is being performed on.
Parameters:
  va - The ValidatorAction that is currentlybeing performed.
Parameters:
  field - The Field object associated with thecurrent field being validated.
Parameters:
  errors - The ActionMessages object to add errorsto if any validation errors occur.
Parameters:
  validator - The Validator instance, used to accessother field values.
Parameters:
  request - Current request object.
public static  ObjectvalidateShortLocale(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request)
     Checks if the field can safely be converted to a short primitive.
Parameters:
  bean - The bean validation is being performed on.
Parameters:
  va - The ValidatorAction that is currentlybeing performed.
Parameters:
  field - The Field object associated with thecurrent field being validated.
Parameters:
  errors - The ActionMessages object to add errorsto if any validation errors occur.
Parameters:
  validator - The Validator instance, used to accessother field values.
Parameters:
  request - Current request object.
public static  booleanvalidateUrl(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request)
     Checks if a field has a valid url.

Field Detail
FIELD_TEST_EQUAL
final public static String FIELD_TEST_EQUAL(Code)



FIELD_TEST_NOTNULL
final public static String FIELD_TEST_NOTNULL(Code)



FIELD_TEST_NULL
final public static String FIELD_TEST_NULL(Code)





Method Detail
isString
protected static boolean isString(Object o)(Code)
Return true if the specified object is a String or a null value.
Parameters:
  o - Object to be tested The string value



validateByte
public static Object validateByte(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request)(Code)
Checks if the field can safely be converted to a byte primitive.
Parameters:
  bean - The bean validation is being performed on.
Parameters:
  va - The ValidatorAction that is currentlybeing performed.
Parameters:
  field - The Field object associated with thecurrent field being validated.
Parameters:
  errors - The ActionMessages object to add errorsto if any validation errors occur.
Parameters:
  validator - The Validator instance, used to accessother field values.
Parameters:
  request - Current request object. true if valid, false otherwise.



validateByteLocale
public static Object validateByteLocale(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request)(Code)
Checks if the field can safely be converted to a byte primitive.
Parameters:
  bean - The bean validation is being performed on.
Parameters:
  va - The ValidatorAction that is currentlybeing performed.
Parameters:
  field - The Field object associated with thecurrent field being validated.
Parameters:
  errors - The ActionMessages object to add errorsto if any validation errors occur.
Parameters:
  validator - The Validator instance, used to accessother field values.
Parameters:
  request - Current request object. true if valid, false otherwise.



validateCreditCard
public static Object validateCreditCard(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request)(Code)
Checks if the field is a valid credit card number.
Parameters:
  bean - The bean validation is being performed on.
Parameters:
  va - The ValidatorAction that is currentlybeing performed.
Parameters:
  field - The Field object associated with thecurrent field being validated.
Parameters:
  errors - The ActionMessages object to add errorsto if any validation errors occur.
Parameters:
  validator - The Validator instance, used to accessother field values.
Parameters:
  request - Current request object. true if valid, false otherwise.



validateDate
public static Object validateDate(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request)(Code)
Checks if the field is a valid date. If the field has a datePattern variable, that will be used to format java.text.SimpleDateFormat. If the field has a datePatternStrict variable, that will be used to format java.text.SimpleDateFormat and the length will be checked so '2/12/1999' will not pass validation with the format 'MM/dd/yyyy' because the month isn't two digits. If no datePattern variable is specified, then the field gets the DateFormat.SHORT format for the locale. The setLenient method is set to false for all variations.
Parameters:
  bean - The bean validation is being performed on.
Parameters:
  va - The ValidatorAction that is currentlybeing performed.
Parameters:
  field - The Field object associated with thecurrent field being validated.
Parameters:
  errors - The ActionMessages object to add errorsto if any validation errors occur.
Parameters:
  validator - The Validator instance, used to accessother field values.
Parameters:
  request - Current request object. true if valid, false otherwise.



validateDouble
public static Object validateDouble(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request)(Code)
Checks if the field can safely be converted to a double primitive.
Parameters:
  bean - The bean validation is being performed on.
Parameters:
  va - The ValidatorAction that is currentlybeing performed.
Parameters:
  field - The Field object associated with thecurrent field being validated.
Parameters:
  errors - The ActionMessages object to add errorsto if any validation errors occur.
Parameters:
  validator - The Validator instance, used to accessother field values.
Parameters:
  request - Current request object. true if valid, false otherwise.



validateDoubleLocale
public static Object validateDoubleLocale(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request)(Code)
Checks if the field can safely be converted to a double primitive.
Parameters:
  bean - The bean validation is being performed on.
Parameters:
  va - The ValidatorAction that is currentlybeing performed.
Parameters:
  field - The Field object associated with thecurrent field being validated.
Parameters:
  errors - The ActionMessages object to add errorsto if any validation errors occur.
Parameters:
  validator - The Validator instance, used to accessother field values.
Parameters:
  request - Current request object. true if valid, false otherwise.



validateDoubleRange
public static boolean validateDoubleRange(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request)(Code)
Checks if a fields value is within a range (min & max specified in the vars attribute).
Parameters:
  bean - The bean validation is being performed on.
Parameters:
  va - The ValidatorAction that is currentlybeing performed.
Parameters:
  field - The Field object associated with thecurrent field being validated.
Parameters:
  errors - The ActionMessages object to add errorsto if any validation errors occur.
Parameters:
  validator - The Validator instance, used to accessother field values.
Parameters:
  request - Current request object. True if in range, false otherwise.



validateEmail
public static boolean validateEmail(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request)(Code)
Checks if a field has a valid e-mail address.
Parameters:
  bean - The bean validation is being performed on.
Parameters:
  va - The ValidatorAction that is currentlybeing performed.
Parameters:
  field - The Field object associated with thecurrent field being validated.
Parameters:
  errors - The ActionMessages object to add errorsto if any validation errors occur.
Parameters:
  validator - The Validator instance, used to accessother field values.
Parameters:
  request - Current request object. True if valid, false otherwise.



validateFloat
public static Object validateFloat(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request)(Code)
Checks if the field can safely be converted to a float primitive.
Parameters:
  bean - The bean validation is being performed on.
Parameters:
  va - The ValidatorAction that is currentlybeing performed.
Parameters:
  field - The Field object associated with thecurrent field being validated.
Parameters:
  errors - The ActionMessages object to add errorsto if any validation errors occur.
Parameters:
  validator - The Validator instance, used to accessother field values.
Parameters:
  request - Current request object. true if valid, false otherwise.



validateFloatLocale
public static Object validateFloatLocale(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request)(Code)
Checks if the field can safely be converted to a float primitive.
Parameters:
  bean - The bean validation is being performed on.
Parameters:
  va - The ValidatorAction that is currentlybeing performed.
Parameters:
  field - The Field object associated with thecurrent field being validated.
Parameters:
  errors - The ActionMessages object to add errorsto if any validation errors occur.
Parameters:
  validator - The Validator instance, used to accessother field values.
Parameters:
  request - Current request object. true if valid, false otherwise.



validateFloatRange
public static boolean validateFloatRange(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request)(Code)
Checks if a fields value is within a range (min & max specified in the vars attribute).
Parameters:
  bean - The bean validation is being performed on.
Parameters:
  va - The ValidatorAction that is currentlybeing performed.
Parameters:
  field - The Field object associated with thecurrent field being validated.
Parameters:
  errors - The ActionMessages object to add errorsto if any validation errors occur.
Parameters:
  validator - The Validator instance, used to accessother field values.
Parameters:
  request - Current request object. True if in range, false otherwise.



validateIntRange
public static boolean validateIntRange(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request)(Code)
Checks if a fields value is within a range (min & max specified in the vars attribute).
Parameters:
  bean - The bean validation is being performed on.
Parameters:
  va - The ValidatorAction that is currentlybeing performed.
Parameters:
  field - The Field object associated with thecurrent field being validated.
Parameters:
  errors - The ActionMessages object to add errorsto if any validation errors occur.
Parameters:
  validator - The Validator instance, used to accessother field values.
Parameters:
  request - Current request object. True if in range, false otherwise.



validateInteger
public static Object validateInteger(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request)(Code)
Checks if the field can safely be converted to an int primitive.
Parameters:
  bean - The bean validation is being performed on.
Parameters:
  va - The ValidatorAction that is currentlybeing performed.
Parameters:
  field - The Field object associated with thecurrent field being validated.
Parameters:
  errors - The ActionMessages object to add errorsto if any validation errors occur.
Parameters:
  validator - The Validator instance, used to accessother field values.
Parameters:
  request - Current request object. true if valid, false otherwise.



validateIntegerLocale
public static Object validateIntegerLocale(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request)(Code)
Checks if the field can safely be converted to an int primitive.
Parameters:
  bean - The bean validation is being performed on.
Parameters:
  va - The ValidatorAction that is currentlybeing performed.
Parameters:
  field - The Field object associated with thecurrent field being validated.
Parameters:
  errors - The ActionMessages object to add errorsto if any validation errors occur.
Parameters:
  validator - The Validator instance, used to accessother field values.
Parameters:
  request - Current request object. true if valid, false otherwise.



validateLong
public static Object validateLong(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request)(Code)
Checks if the field can safely be converted to a long primitive.
Parameters:
  bean - The bean validation is being performed on.
Parameters:
  va - The ValidatorAction that is currentlybeing performed.
Parameters:
  field - The Field object associated with thecurrent field being validated.
Parameters:
  errors - The ActionMessages object to add errorsto if any validation errors occur.
Parameters:
  validator - The Validator instance, used to accessother field values.
Parameters:
  request - Current request object. true if valid, false otherwise.



validateLongLocale
public static Object validateLongLocale(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request)(Code)
Checks if the field can safely be converted to a long primitive.
Parameters:
  bean - The bean validation is being performed on.
Parameters:
  va - The ValidatorAction that is currentlybeing performed.
Parameters:
  field - The Field object associated with thecurrent field being validated.
Parameters:
  errors - The ActionMessages object to add errorsto if any validation errors occur.
Parameters:
  validator - The Validator instance, used to accessother field values.
Parameters:
  request - Current request object. true if valid, false otherwise.



validateLongRange
public static boolean validateLongRange(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request)(Code)
Checks if a fields value is within a range (min & max specified in the vars attribute).
Parameters:
  bean - The bean validation is being performed on.
Parameters:
  va - The ValidatorAction that is currentlybeing performed.
Parameters:
  field - The Field object associated with thecurrent field being validated.
Parameters:
  errors - The ActionMessages object to add errorsto if any validation errors occur.
Parameters:
  validator - The Validator instance, used to accessother field values.
Parameters:
  request - Current request object. True if in range, false otherwise.



validateMask
public static boolean validateMask(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request)(Code)
Checks if the field matches the regular expression in the field's mask attribute.
Parameters:
  bean - The bean validation is being performed on.
Parameters:
  va - The ValidatorAction that is currentlybeing performed.
Parameters:
  field - The Field object associated with thecurrent field being validated.
Parameters:
  errors - The ActionMessages object to add errorsto if any validation errors occur.
Parameters:
  validator - The Validator instance, used to accessother field values.
Parameters:
  request - Current request object. true if field matches mask, false otherwise.



validateMaxLength
public static boolean validateMaxLength(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request)(Code)
Checks if the field's length is less than or equal to the maximum value. A Null will be considered an error.
Parameters:
  bean - The bean validation is being performed on.
Parameters:
  va - The ValidatorAction that is currentlybeing performed.
Parameters:
  field - The Field object associated with thecurrent field being validated.
Parameters:
  errors - The ActionMessages object to add errorsto if any validation errors occur.
Parameters:
  validator - The Validator instance, used to accessother field values.
Parameters:
  request - Current request object. True if stated conditions met.



validateMinLength
public static boolean validateMinLength(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request)(Code)
Checks if the field's length is greater than or equal to the minimum value. A Null will be considered an error.
Parameters:
  bean - The bean validation is being performed on.
Parameters:
  va - The ValidatorAction that is currentlybeing performed.
Parameters:
  field - The Field object associated with thecurrent field being validated.
Parameters:
  errors - The ActionMessages object to add errorsto if any validation errors occur.
Parameters:
  validator - The Validator instance, used to accessother field values.
Parameters:
  request - Current request object. True if stated conditions met.



validateRequired
public static boolean validateRequired(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request)(Code)
Checks if the field isn't null and length of the field is greater than zero not including whitespace.
Parameters:
  bean - The bean validation is being performed on.
Parameters:
  va - The ValidatorAction that is currentlybeing performed.
Parameters:
  field - The Field object associated with thecurrent field being validated.
Parameters:
  errors - The ActionMessages object to add errorsto if any validation errors occur.
Parameters:
  validator - The Validator instance, used to accessother field values.
Parameters:
  request - Current request object. true if meets stated requirements, false otherwise.



validateRequiredIf
public static boolean validateRequiredIf(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request)(Code)
Checks if the field isn't null based on the values of other fields.
Parameters:
  bean - The bean validation is being performed on.
Parameters:
  va - The ValidatorAction that is currentlybeing performed.
Parameters:
  field - The Field object associated with thecurrent field being validated.
Parameters:
  errors - The ActionMessages object to add errorsto if any validation errors occur.
Parameters:
  validator - The Validator instance, used to accessother field values.
Parameters:
  request - Current request object. true if meets stated requirements, false otherwise.



validateShort
public static Object validateShort(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request)(Code)
Checks if the field can safely be converted to a short primitive.
Parameters:
  bean - The bean validation is being performed on.
Parameters:
  va - The ValidatorAction that is currentlybeing performed.
Parameters:
  field - The Field object associated with thecurrent field being validated.
Parameters:
  errors - The ActionMessages object to add errorsto if any validation errors occur.
Parameters:
  validator - The Validator instance, used to accessother field values.
Parameters:
  request - Current request object. true if valid, false otherwise.



validateShortLocale
public static Object validateShortLocale(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request)(Code)
Checks if the field can safely be converted to a short primitive.
Parameters:
  bean - The bean validation is being performed on.
Parameters:
  va - The ValidatorAction that is currentlybeing performed.
Parameters:
  field - The Field object associated with thecurrent field being validated.
Parameters:
  errors - The ActionMessages object to add errorsto if any validation errors occur.
Parameters:
  validator - The Validator instance, used to accessother field values.
Parameters:
  request - Current request object. true if valid, false otherwise.



validateUrl
public static boolean validateUrl(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request)(Code)
Checks if a field has a valid url. Four optional variables can be specified to configure url validation.
  • Variable allow2slashes can be set to true or false to control whether two slashes are allowed - default is false (i.e. two slashes are NOT allowed).
  • Variable nofragments can be set to true or false to control whether fragments are allowed - default is false (i.e. fragments ARE allowed).
  • Variable allowallschemes can be set to true or false to control if all schemes are allowed - default is false (i.e. all schemes are NOT allowed).
  • Variable schemes can be set to a comma delimited list of valid schemes. This value is ignored if allowallschemes is set to true. Default schemes allowed are "http", "https" and "ftp" if this variable is not specified.

Parameters:
  bean - The bean validation is being performed on.
Parameters:
  va - The ValidatorAction that is currentlybeing performed.
Parameters:
  field - The Field object associated with thecurrent field being validated.
Parameters:
  errors - The ActionMessages object to add errorsto if any validation errors occur.
Parameters:
  validator - The Validator instance, used to accessother field values.
Parameters:
  request - Current request object. True if valid, false otherwise.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.