Skip to content

With the extension, a new text field is available in the form generator, where a Individual input check via Regular Expression (Regex) and a message is displayed in the event of an error.

License

Notifications You must be signed in to change notification settings

e-spin/form-regex-bundle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contao form-regex (EN)

With the extension, a new text field is available in the form generator, where a Individual input check via Regular Expression (Regex) and a message is displayed in the event of an error.

In addition, a checkbox can be used to output the pattern as an HTML5 attribute for a browser check.

Contao form-regex (DE)

Mit der Erweiterung steht ein neues Textfeld im Formulargenerator zur Verfügung, bei dem eine individuelle Eingabeprüfung per Regular Expression (Regex) erfolgt und im Fehlerfall eine entsprechende Meldung ausgegeben wird.

Zusätzlich kann über eine Checkbox das Pattern auch als HTML5-Attribut für eine Prüfung im Browser ausgegeben werden.

Beispiele

Die s. g. "Pattern" für die Regex-Prüfung findet man z. B. auf https://regexlib.com/ - ein Test ist z. B. auf der Webseite https://regex101.com/ möglich.

  • ISBN: ^97(?:8|9)([ -])\d{1,5}\1\d{1,7}\1\d{1,6}\1\d$
  • Integer-Zahlen ohne führende 0: ([1-9]+\d*)
  • Passwort: 2 Großbuchstaben, 2 Kleinbuchstaben, 2 Sonderzeichen, mind. 9 Zeichen, keine Leerzeichen: ^(?=.*[a-z].*[a-z])(?=.*[A-Z].*[A-Z])(?=.*\d.*\d)(?=.*\W.*\W)[a-zA-Z0-9\S]{9,}$
  • E-Mail oder E-Mails als Liste mit Komma: ^((\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*)\s*[,]{0,1}\s*)+$

Beispielformular unter https://www.e-spin.de/form-regex-test.html

Screenshot widget

About

With the extension, a new text field is available in the form generator, where a Individual input check via Regular Expression (Regex) and a message is displayed in the event of an error.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

 
 
 

Languages