RequiredValidator
- Description
- Widgets that have this feature in use are required to have an entry.
- If there is no entry, Screen validation will fail if it is activated and user won’t be able to proceed with an action conditioned by validation.
Attributes
Attribute | Description |
---|---|
message
|
Defines message to be displayed when validation fails
Can be
|
gn:minRequiredItems
|
Defines minimum amount of items in widget: (milestone 101)
Can be
|
MINREQUIREDErrMsg
|
Defines error message for minimum required items fail: (milestone 101)
Can be
|
labelTextResourceId
|
Defines label resource which will be added to validator string at location of reserved token ${labelTextResourceId}
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 RequiredValidator
${labelTextResourceId}
- will be replaced by the content of thelabelTextResourceId
validator attribute in final message, only if that attribute exists
Validator signatures
Check required value
[name:RequiredValidator],[message=validatorMessage]]
Example
@string/screen13_falseCeiling1stFixRequiredValidatorMessage
- validator message
- ⤷
[name:RequiredValidator],[message=@string/screen13_falseCeiling1stFixRequiredValidatorMessage]
- ⤷
Can be used on widgets
GnEditText
- Validation will fail if length is0
GnDropDown
- Validation will fail if no item is selectedGnDropDownSelection
- Validation will fail if no item is selectedGnMediaAction
- Validation will fail if no media is takenGnCaptureSignature
- Validation will fail if no signature is takenGnPhoneNumber
- Validation will fail if no phone number is storedGnEmail
- Validation will fail if no email is storedGnRadioGroup
- Validation will fail if no radio button is selected