Class VSelectValue
java.lang.Object
fc.web.forms.FieldValidator
fc.web.forms.VSelectValue
Validates that a select field has:
- some value(s)
- the values(s) are not a pre-specified value.
---choose an option--- type selection. In that case, we would
check to see if the select value was not ---choose an
option---.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanvalidate(FormData fd, HttpServletRequest req) Works with theSelectfield.Methods inherited from class FieldValidator
getErrorMessage, getField
-
Constructor Details
-
VSelectValue
- Parameters:
field- the parent fielderrorMessage- error message for unsuccessful validation error.badSelectValue- the select value which will cause the validation to fail
-
-
Method Details
-
validate
Works with theSelectfield.- Specified by:
validatein classFieldValidator- Throws:
ClassCastException- If the field'sSelect.getValue(FormData)method does not return a collection ofSelect.Optionobjects
-