| 1. |
What Is The Purpose Of @intrangefieldvalidator Annotation? |
|
Answer» This validation annotation checks that a numeric field has a value within a specified range. If neither MIN nor max is set, nothing will be DONE. PUBLIC class Employee extends ActionSupport{ @IntRangeFieldValidator(message = "Default message", KEY = "i18n.key", shortCircuit = true, min = "0", max = "42") public String GETAGE() { return age; } } This validation annotation checks that a numeric field has a value within a specified range. If neither min nor max is set, nothing will be done. public class Employee extends ActionSupport{ @IntRangeFieldValidator(message = "Default message", key = "i18n.key", shortCircuit = true, min = "0", max = "42") public String getAge() { return age; } } |
|