Changing validation logic

You can include client-side validation logic for Management Center. Create validation rules for information that business users provide through the user interface. For example, validate that text is entered by a user instead of numbers, or that a start date is before an end date, or that a mandatory field is entered.

Management Center includes two types of client-side validation: object level, and object property level. There are a number of existing validators, which extend from the validator class. You can also implicitly define validation rules by using the following attributes of the property definition:
  • maxValue
  • maximumSize
  • minValue
  • required
  • type
If these existing validators, or the implicit validators, do not meet your needs, you can write a custom validator.

When an object is modified in Management Center, client-side validation is invoked and if errors are found, the validator adds the error to the object or to a specific object property. The error messages that are reported by the validator display in the properties view. If the message is scoped to a specific property, the widgets that display the property are modified to display an indication that the property is in error. When the widget is selected, any associated error messages are displayed. Messages are also logged within the message console.