Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

Example usage of validate.pattern of a form field

Started by Muut Archive 9 years ago · 2 replies · 1534 views
9 years ago

Has anyone a, or preferably more than one, example of a validation pattern to be used to validate an entered value in a Form Plugin field?
Searching the web and of course including this forum and the getgrav repo's on GitHub didn't help. Info on this seems very rare?

9 years ago

Any valid regex pattern should work, like here. Can't find any good examples of it in use either, but the web has plenty of examples of regex-rules, and you could use a tool like Regex101 to test values against patterns.

9 years ago

Great, thanks. I overlooked that one, probably because I'm more busy with front-end forms.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 2276 9 years ago
Archive · by Muut Archive, 9 years ago
2 1496 9 years ago
Archive · by Muut Archive, 9 years ago
2 4745 9 years ago
Archive · by Muut Archive, 9 years ago
1 3555 9 years ago
Archive · by Muut Archive, 9 years ago
3 1619 9 years ago