fc.web.forms
Class VPasswordGroup
java.lang.Object
fc.web.forms.FormValidator
fc.web.forms.VPasswordGroup
public final class VPasswordGroup
- extends FormValidator
Validates two password input boxes to see if they are the
same. All forms should ask for the password twice when
signing up the user.
Automatically resets both password fields if they do not
match.
Note, password rules such as required length, characters
etc., are not checked by this validator. Add a VText
to each password field for that purupose.
Method Summary |
boolean |
validate(FormData fd,
javax.servlet.http.HttpServletRequest req)
Validates multiple fields together. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
VPasswordGroup
public VPasswordGroup(Form f,
java.lang.String name,
java.lang.String errorMessage,
Password field_one,
Password field_two)
- Parameters:
field_one
- the first password boxfield_two
- the second password box
validate
public boolean validate(FormData fd,
javax.servlet.http.HttpServletRequest req)
- Description copied from class:
FormValidator
- Validates multiple fields together. Note, implementations need
not call the validator for each field if that field also has a field
level validator (since each field is individually validated by the
form). Implementations should validate multiple fields to see if
they make sense when analysed as a whole.
Important notes:
Typically, validation should be skipped in the following circumstances:
- The field is disabled.
- The field is an instance of
DependentField
and the
DependentField#shouldValidate
method returns false.
- Specified by:
validate
in class FormValidator
- Returns:
- true is validation succeeded, false otherwise