Skip to content

💡 [FEATURE] - Add support for custom validators via options #10

@isonnymichael

Description

@isonnymichael

Summary

Enable real-time validation by adding a validateOnBlur option so that inputs are validated as soon as they lose focus, not just on form submit.

Basic Example

validateForm('my-form', {
  validators: {
    username: (value) => value.length >= 6,
    age: (value) => Number(value) > 18
  }
});
  • Custom validators can be provided as an object
  • Validator functions receive input value
  • If validation fails, show default or custom error

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