Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

Example usage of validate.pattern of a form field

Started by Muut Archive 10 years ago · 2 replies · 1592 views
10 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?

10 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.

10 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 2570 9 years ago
Archive · by Muut Archive, 9 years ago
2 1692 9 years ago
Archive · by Muut Archive, 9 years ago
2 4985 9 years ago
Archive · by Muut Archive, 9 years ago
1 3810 9 years ago
Archive · by Muut Archive, 9 years ago
3 1801 9 years ago