Develop > Presentation layer > Management Center framework > Customize the Management Center user interface > Customizing an existing Management Center tool


Changing validation logic

You can include client-side validation logic for the Management Center. Create validation rules for information that users provide using the user interface. For example, validate that users have entered text, not numbers; that a start date is not later than an end date; or that a mandatory field is not empty).

The Management Center includes two types of client-side validation: at the object level, and at the object property level. There are a number of existing validators (see the classes that extend from wcfValidator). You can also implicitly declare validation rules by using the following attributes of wcfPropertyDefinition: maxValue, maximumSize, minValue, required, and type. If the existing validators, or the implicit validators, do not meet the needs, you can write a custom validator.

When an object is modified on the client, 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 reported by the validator are displayed in the properties view and if the message is scoped to a specific property, the widgets that display that property are given a visual treatment to indicate that the property is in error. When the widget is given focus, any associated error messages are displayed. Client-side messages are also logged in the Management Center message console.


Related concepts

Management Center shell

Management Center user interface


+

Search Tips   |   Advanced Search