Summary
Currently, validateForm only accepts a formId string. To support more advanced use cases, allow the function to accept an optional configuration object as a second parameter to modify behavior.
Basic Example
Update the function signature to:
validateForm('my-form', { isSubmit: false, withResponse: true });
isSubmit: Whether to auto-submit on valid form (true by default)
withResponse: Whether to return a validation result object
Additional context
No response
Summary
Currently,
validateFormonly accepts aformIdstring. To support more advanced use cases, allow the function to accept an optional configuration object as a second parameter to modify behavior.Basic Example
Update the function signature to:
validateForm('my-form', { isSubmit: false, withResponse: true });isSubmit: Whether to auto-submit on valid form (true by default)withResponse: Whether to return a validation result objectAdditional context
No response