Skip to content

💡 [FEATURE] - Add optional config object to validateForm parameter for behavior variations #5

@isonnymichael

Description

@isonnymichael

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions