Using the formValidation interceptor you can validate the input of HTML forms.
Security Hint
The expressions run on form fields sent by clients. Overlapping quantifiers such as (\w+\s?)* can take a long time on crafted input. See ReDoS Protection.
Example Configuration
api:
port: 2000
flow:
- formValidation:
- name: age
regex: |
\d+
- name: name
regex: |
[a-z]+
api:
port: 2000
flow:
- formValidation:
- name: age
regex: |
\d+
- name: name
regex: |
[a-z]+
Syntax
formValidation:
- <formValidation-field>formValidation: - <formValidation-field>