Class GroupValidators
java.lang.Object
ch.tocco.nice2.validate.api.validators.GroupValidators
Static utility methods for dealing with
group validators
.-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
allowNegativeNumber
(Iterable<Validator> iter) static GroupValidator
Wraps the GroupValidator so that only validations are visible that are active on the client.static Integer[]
getLengthRange
(Iterable<Validator> iter) static Number[]
getNumberRange
(Iterable<Validator> iter) getPostPointDigits
(Iterable<Validator> iter) getPrePointDigits
(Iterable<Validator> iter) static Pattern[]
getRegExps
(Iterable<Validator> iter) static GroupValidator
Wraps the GroupValidator so that only validations are visible that are active on the server.getTextLength
(GroupValidator validator) static boolean
isMandatory
(Iterable<Validator> iter) Tells if the field is mandatory (not 'blank').
-
Method Details
-
getServerView
Wraps the GroupValidator so that only validations are visible that are active on the server. This way client-only validations are ignored. -
getClientView
Wraps the GroupValidator so that only validations are visible that are active on the client. This way server-only validations are ignored. -
isMandatory
Tells if the field is mandatory (not 'blank').Takes only conditionless, error-level validators into account.
- Parameters:
iter
- An iteratable, for example a ValidatorGroup or a List. - Returns:
- True if the field is mandatory.
-
getNumberRange
-
allowNegativeNumber
-
getLengthRange
-
getPostPointDigits
-
getPrePointDigits
-
getTextLength
-
getRegExps
-