ByteLengthValidator is a {@link Validator} that checksthe value of the corresponding component for its byte length for the set character encoding. The following algorithm is implemented:
null
, exit immediately.encoding
and maximum
property has been configured on this {@link Validator}, check the component value byte length against the maximum. If the component value byte length is greater than this specified maximum, throw a {@link ValidatorException}containing a MAXIMUM_MESSAGE_ID message.maximum
property has been configured on this {@link Validator}, check the component value against this limit defaulting the encoding to be iso-8859-1
. If the component value length is greater than the specified maximum, throw a {@link ValidatorException} containing a MAXIMUM_MESSAGE_IDmessage.encoding
property has been configured on this {@link Validator}, and if it is not a valid Java encoding, then throws a {@link java.nio.charset.IllegalCharsetNameException}maximumMessageDetail
is set, it is used for constructing faces message, when validation fails. The message can contain placeholders which will be replaced as specified in {@link #MAXIMUM_MESSAGE_ID}Enables byte length validation at the client side.
|
|
|
|
|
|
|
|