Struts2 String Length Validation Example
The stringlength validator indicates that string must be of given length. It tends to be utilized in username, secret word etc.
It trims the string bydefault then checks if its length is of the given length.
Parameters of stringlength validator
There are 4 parameters characterized for stringlength validator.
|fieldName||specifies the field name that will be approved. It is required in Plain-Validator only.|
|minLength||indicates the base length. It is overlooked bydefault.|
|maxLength||indicates the greatest length. It is disregarded bydefault.|
|trim||trims the field esteems. It is bydefault genuine methods it is empowered bydefault.|