Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Form Validation: Pattern

Started by Muut Archive 10 years ago · 1 replies · 610 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 Deleted User, 9 years ago
0 1366 9 years ago
Archive · by Muut Archive, 9 years ago
2 940 9 years ago
Archive · by Muut Archive, 9 years ago
2 4069 9 years ago
Archive · by Muut Archive, 9 years ago
1 2960 9 years ago
Archive · by Muut Archive, 9 years ago
3 1125 9 years ago