From wiki.ginstr.com
Jump to: navigation, search

gn:act_validateScreen

Description
Validates widgets on the same screen with gn:act_validate attribute defined.
Action returns
boolean

Action signatures

Validate all widgets

[gn:act_validateScreen]|[]

Example

[gn:act_validateScreen]|[]

Validate specific widgets

[gn:act_validateScreen]|[source{n}]
Parameter Description
source source which should be validated

Example

@+id/resident_DNR,@+id/service_name - widgets which will be validated
[gn:act_validateScreen]|[@+id/resident_DNR,@+id/service_name]

Special attributes

gn:act_validate
Must be defined on widgets which should be validated.
More information about validators here.
Can be used on widgets
GnDropDown
GnEditText
GnDatePicker
GnDateTimePicker
GnTimePicker
GnDropDownSelection
GnPhoneNumber
GnEmail
GnRadioGroup
GnMediaAction
GnCaptureSignature

Example

<com.ginstr.widgets.GnEditText
  android:id="@+id/assetItem_assetNumber"
  android:layout_width="match_parent"
  android:layout_height="wrap_content"
  android:layout_marginBottom="20dp"
  gn:paddingTop="2dp"
  gn:paddingBottom="2dp"
  gn:act_validate="[name:RequiredValidator],[message=@string/addAsset_assetNumberRequiredValidatorMessage]"
  android:background="@drawable/enteringFieldTransparent2.9"
  android:textSize="20sp"
  android:textColorHint="#BABABA"
  gn:s_hint="@string/addAsset_assetNumberHint"
  gn:s_sourceType="input"/>