From wiki.ginstr.com
Jump to: navigation, search
m (formatting)
Line 5: Line 5:
 
;Description
 
;Description
 
: Widgets that have this feature in use are required to have an entry.
 
: Widgets that have this feature in use are required to have an entry.
: If there is no entry [[Validation#Screen_validation|Screen validation]] will fail if it is activated and user won’t be able to proceed with an action conditioned by validation.
+
: If there is no entry, [[Validation#Screen_validation|Screen validation]] will fail if it is activated and user won’t be able to proceed with an action conditioned by validation.
  
 
==Attributes==
 
==Attributes==
Line 14: Line 14:
 
! scope="col" | Description
 
! scope="col" | Description
 
|-
 
|-
| title="Attribute" | message
+
| title="Attribute" | <code>message</code>
 
| title="Description" | Defines message to be displayed when validation fails
 
| title="Description" | Defines message to be displayed when validation fails
  
Line 25: Line 25:
 
===Check required value===
 
===Check required value===
  
;<code>[name:ComparatorValidator],[message=[[strings.xml|validatorMessage]]]]</code>
+
:;<code>[name:ComparatorValidator],[message=[[strings.xml|validatorMessage]]]]</code>
  
 
====Example====
 
====Example====
<code>@string/screen13_falseCeiling1stFixRequiredValidatorMessage</code> - validator message<br><br>
+
:<code>@string/screen13_falseCeiling1stFixRequiredValidatorMessage</code> - validator message<br>
<code>[name:RequiredValidator],[message=@string/screen13_falseCeiling1stFixRequiredValidatorMessage]</code>
+
:; ⤷ <code>[name:RequiredValidator],[message=@string/screen13_falseCeiling1stFixRequiredValidatorMessage]</code>
  
 
==Can be used on widgets==
 
==Can be used on widgets==
*<code>[[GnEditText]]</code> - Validation will fail if length is 0
+
*<code>[[GnEditText]]</code> - Validation will fail if length is <code>0</code>
 
*<code>[[GnDropDown]]</code> - Validation will fail if no item is selected
 
*<code>[[GnDropDown]]</code> - Validation will fail if no item is selected
 
*<code>[[GnDropDownSelection]]</code> - Validation will fail if no item is selected
 
*<code>[[GnDropDownSelection]]</code> - Validation will fail if no item is selected
 
*<code>[[GnMediaAction]]</code> - Validation will fail if no media is taken
 
*<code>[[GnMediaAction]]</code> - Validation will fail if no media is taken
 
*<code>[[GnCaptureSignature]]</code> - Validation will fail if no signature is taken
 
*<code>[[GnCaptureSignature]]</code> - Validation will fail if no signature is taken
*<code>[[GnPhoneNumber]]</code> - Validation will fail if no phone muber is stored
+
*<code>[[GnPhoneNumber]]</code> - Validation will fail if no phone number is stored
 
*<code>[[GnEmail]]</code> - Validation will fail if no email is stored
 
*<code>[[GnEmail]]</code> - Validation will fail if no email is stored
 
*<code>[[GnRadioGroup]]</code> - Validation will fail if no radio button is selected
 
*<code>[[GnRadioGroup]]</code> - Validation will fail if no radio button is selected

Revision as of 21:00, 12 July 2017

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

  • @string

Validator signatures

Check required value

[name:ComparatorValidator],[message=validatorMessage]]

Example

@string/screen13_falseCeiling1stFixRequiredValidatorMessage - validator message
[name:RequiredValidator],[message=@string/screen13_falseCeiling1stFixRequiredValidatorMessage]

Can be used on widgets