Skip to content

Commit

Permalink
Documented validation message
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Pierson authored and Ryan Pierson committed Feb 23, 2018
1 parent a77c110 commit ca4e3c8
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions pages/06.forms/02.forms/04.reference-form-actions/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,21 @@ process:
- display: thankyou
```

#### Validation Message

You can utilize the message action to trigger in the event of a failed validation. For example:

```yaml
username:
type: text
label: Username
validate:
required: true
message: My custom message when validation fails!
```

This will enable you to write a custom message that users will see in the event that validation fails.

### Display

After submitting the form the user can be redirected to another page. That page will be a subpage of the form, so for example, if your form lives in `/form`, you can redirect users to `/form/thankyou` with the following code:
Expand Down

0 comments on commit ca4e3c8

Please sign in to comment.