Validating these strings can be an issue when user input for such fields is not required.
Java String length() function returns the length of the sequence of characters represented by this object.
Validating input received from the user to maintain data integrity is an important part of application logic.
Validation of data can take place at different layers in even the simplest of applications, as shown in Developing a Simple Facelets Application.
The tag) for numerical data at the presentation layer and for a valid range of numbers at the business layer.