fix: improve color widget, add tests (#712)

This commit is contained in:
Daniel Lautzenheiser
2023-04-19 10:57:34 -04:00
committed by GitHub
parent 23df691a0a
commit 28fd9caf4c
11 changed files with 628 additions and 11 deletions

View File

@ -179,6 +179,10 @@ collections:
- name: required
label: Required Validation
widget: color
- name: allow_input
label: Allow Input
widget: color
allow_input: true
- name: with_default
label: Required With Default
widget: color
@ -186,7 +190,7 @@ collections:
- name: pattern
label: Pattern Validation
widget: color
pattern: ['^#([0-9a-fA-F]{3})(?:[0-9a-fA-F]{3})?$', 'Must be a valid hex code']
pattern: ['^#[a-fA-F0-9]{3}$|^[a-fA-F0-9]{4}$|^[a-fA-F0-9]{6}$', 'Must be a valid hex code']
allow_input: true
required: false
- name: alpha