Some widget types may have Validator (often called Formatter) objects assigned. There are two ways to assign a Validator.
Validator attach due to BusinessData (BD) attribute link: With the XMA Mapper Plugin (see Topic DataBinding(Data Mapping Editor)) it is possible to link XMA widgets with BD attributes. By linking the BD attribute a Validator for the corresponding widget is also created.
Validator attach due to Validator Dialog editing: You can assign a Validator object to a widget per hand. You can select the appropriate Validator type and enter the necessary information. If a BD attribute is already linked to the correspondent widget, the Validator type is predefined by the link. Then the entered information cross-fades the information of the generated BD attribute validator.
There exists 6 Types of Validators:
Bcd Validator
Date Validator
String Validator
Timestamp Validator
Custom Validator
Boolean Validator
With the Validatortype Combo you can choose what validator to use. If there exists a BD Validator you will see the properties of this Validator in the upper left corner.
A Bcd Validator object using fixed-point representation for modeling real number. It is used to generate a BcdFmt class with the appropriate parameter. If you set a Bcd Validator the first time the Alignment of the Textfield ist set to RIGHT.
The controls of the dialog have the following meaning:
| Property | Type | Description |
| Mandatory | boolean | True, if the underlying field is mandatory. |
| 1000 Separator | SelectionList | If true, the Money Style is enforced. not_set means this attribute is not set. |
| Negative value possible | SelectionList | If true, negative values are allowed. not_set means this attribute is not set. |
| Digits before Comma | int | Count of digits before the comma. -1 means unrestricted |
| Digits after Comma | Count of digits after the comma. -1 means unrestricted | |
| Lower Limit of value | Bcd | Values less then this value are not accepted |
| Upper Limit of value | Bcd | Values greater then this value are not accepted. |
| Suppress Zero Values | boolean | If true, supress zeros on the display and an empty input will be transformed to zero's. |
Table 4.2. BCD validator properties
A Date Validator object is used to generate a DateFmt class with the appropriate parameter.
The controls of the dialog have the following meaning:
| Property | Type | Description |
| Mandatory | boolean | True, if the underlying field is mandatory. |
| Format | SelectionList | Specifies the possible Date Formats. Values: SHORT MEDIUM LONG FULL |
Table 4.3. date validator properties
A String Validator object is used to generate a StringFmt class with the appropriate parameter.
The controls of the dialog have the following meaning:
| Property | Type | Description |
| Mandatory | boolean | True, if the underlying field is mandatory. |
| Max Length | int | The maximum length of an accepted string. -1 means unlimited |
| Min Length | int | The minimum length of an accepted string. |
| Formating Range | String | A string denoting one ore more character ranges. See AStringFmtRange for a syntax description. |
Table 4.4. string validator properties
A TimeStamp Validator object is used to generate a TimeStampFmt class with the appropriate parameter.
The controls of the dialog have the following meaning:
| Property | Type | Description |
| Mandatory | boolean | True, if the underlying field is mandatory. |
| Format | SelectionList | Specifies the possible TimestampFormats. Values: SHORT MEDIUM LONG FULL |
Table 4.5. timestamp validator properties
A Custom Validator object is used to generate custom formater with the appropriate parameter. By means of the Use a custom validator instead checkbox it is possible to override the validatortype used in the businessdata.
Learn more about Custom Validators in ChapterData Source.(Guidesigner Overview)
The controls of the dialog have the following meaning:
| Property | Type | Description |
| Mandatory | boolean | True, if the underlying field is mandatory. |
| Format String | editable SelectionList | Selection list to choose ore input the needed format of the custom validator/formater. Specifies the possible Formats. -- String Patterns: s,(,m&ul&lc) s,35,m&ul sm,,(,m&ul&lc) sr,,,(,m&ul&lc) sr,2,10,a-zA-Z0-9öäüÖÄÜ -- Numeric Patterns: n,,(,m&t&nn) nr,,,,(,m&t&nn) np,,,(,m&t&nn) np,00.00000,10,5,m -- Date Patterns: d(,m&sho&med&lon&ful) dr,,(,m&sho&med&lon&ful) dr,1,10,m dr,19000101,,m dp,(,m) dp,yyyy-MM-dd,m -- Timestamp Patterns: ts(,m&sho&med&lon&ful(,m&sho&med&lon&ful)) ts,ful,ful tsp,(,m) tsp,dd.MM.yyyy HH:mm:ss.SSS |
Table 4.6. custom validator properties