Skip to content

Commit c7905a1

Browse files
committed
add example for input patterns
1 parent 508d555 commit c7905a1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

examples/official-site/sqlpage/migrations/01_documentation.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ When loading the page, the value for `:username` will be `NULL` if no value has
264264
'{"name": "Last name", "required": true, "description": "We need your last name for legal purposes."},'||
265265
'{"name": "Resume", "type": "textarea"},'||
266266
'{"name": "Birth date", "type": "date", "max": "2010-01-01", "value": "1994-04-16"},'||
267+
'{"name": "Password", "type": "password", "pattern": "^(?=.*[A-Za-z])(?=.*\\d)[A-Za-z\\d]{8,}$", "required": true, "description": "Minimum eight characters, at least one letter and one number."},'||
267268
'{"label": "I accept the terms and conditions", "name": "terms", "type": "checkbox", "required": true}'||
268269
']')),
269270
('form', 'This example illustrates the use of the `select` type.

0 commit comments

Comments
 (0)