CheckRequiredFields¶
You can run a check to make sure that the app user has provided inputs for all required fields. Specific UI controls or rules allow you to define a field as mandatory.
All the properties defined under Action are applicable to this action.
CheckRequiredFields Properties¶
| Property | Type | Required |
|---|---|---|
| RequiredFields | string[] |
Yes |
| _Type | const |
Yes |
RequiredFields¶
Names of required fields. Value can be an array of string constants or a rule.
- type:
string[]
All items must be of the type: string
_Type¶
- type:
const
The value of this property must be:
"Action.Type.CheckRequiredFields"
Action Result¶
Refer to the MDK Guide to understand what an action result is.
This action does not have an ActionResult if all the specified controls contain a value. Otherwise, the ActionResult is the array of controls missing a value.
Examples¶
// CheckRequiredFields.action
{
"OnFailure": "/MDKApp/Actions/FailureMessage.action",
"OnSuccess": "/MDKApp/Actions/UpdateService.action",
"RequiredFields": [
"OrderDesc",
"OrderQty",
"Cost"
],
"_Type": "Action.Type.CheckRequiredFields"
}