Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Form Validation: Pattern

Started by Muut Archive 10 years ago · 1 replies · 728 views
10 years ago

Is there any documentation how to create a validation pattern?

For me, I have created a textfield that should only contain a number. so, I tried:

YAML
validate:
  required: true
  pattern: [0-9]

But the browser does not recognize this pattern. Did I miss something? Result is a false positive, even if I only insert only numbers, I get a validation error from the browser.

10 years ago

never mind ... found it in the admin docs...

Suggested topics

Topic Participants Replies Views Activity
Archive · by Muut Archive, 10 years ago
1 676 1 week ago
Archive · by Deleted User, 9 years ago
0 3043 9 years ago
Archive · by Muut Archive, 9 years ago
2 1983 9 years ago
Archive · by Muut Archive, 9 years ago
2 5338 9 years ago
Archive · by Muut Archive, 9 years ago
1 4135 9 years ago