NumberValidator
- Description
NumberValidator
performs a number value validation check.- Can be used on
GnEditText
widgets only. - It contains subvalidators from which each performs a validation if present.
- At least one subvalidation attribute is required in validator definition.
Attributes
Note: An attribute marked with asterisk (*) is obligatory
minValue
|
Defines minimum value of number in field
Can be
|
maxValue
|
Defines maximum value of number in field
Can be
|
message *
|
Defines default message to be displayed when validation fails
Can be
|
Reserved tokens
In @string
resources that are used for validator messages it's possible to use special tokens (reserved words). Token will be replaced by actual value during runtime of ginstr app.
- For NumberValidator
${minValue}
- will be replaced by the content of theminValue
validator attribute${maxValue}
- will be replaced by the content of themaxValue
validator attribute
Validator signatures
Number validator
[name:NumberValidator],[message=validatorMessage], [minValue=value], [maxValue=value]]
Example
message=@string/validationError
- validation error messageminValue=2
- min valuemaxValue=8
- max valueNUMBERErrMsg=@string/numberError
- number error message
- ⤷
[name:NumberValidator], [message=@string/validationError], [minValue=2], [maxValue=8]
- ⤷