Problem/Motivation
The module doesn't fully pass to formkit the validation for text fields' length.
Additionally, when a regex is added, the validation is overridden because the regex logic creates a formkit "string" validation rather than array.
Proposed resolution
I attach here my proposed solution:
- Length checks are added for TextField and TextAreaField
- Regex validation is moved to a separate function, returns an array to be concatenated with previous validations.
- Regex validation function also returns the validation message set in webform.
Issue fork webform_headless-3539985
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
oceansprite commentedComment #4
oceansprite commentedComment #5
oceansprite commentedComment #6
dieterholvoet commentedThanks for your contribution! I left some comments in the MR.
Comment #7
oceansprite commentedThank you for checking it out so quickly!
But, I can't find your comments on the MR, are they already submitted?
(I am new to Drupal and contributing)
Comment #8
dieterholvoet commentedMy bad, I still had to submit the review. Done now!
Comment #9
dieterholvoet commentedComment #10
dieterholvoet commentedComment #11
oceansprite commentedThank you for your commits and review!
Your changes looks good to me.
Comment #12
dieterholvoet commented