We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When submitting an action, there should be an option to enable/customize client-side validation.
abstract class ValidationResult; class PositiveValidationResult extends ValidationResult; class NegativeValidationResult extends ValidationResult { invalidFields: Field[]; } type Validator = (fields: Field[]) => ValidationResult; // custom validator await submit(action, { validator: (fields: Field[]): ValidationResult => { const invalidFields: Field[] = []; // validate fields (e.g., based on `type`) return invalidFields.length > 0 ? new NegativeValidationResult(invalidFields) : new PositiveValidationResult(); } }); // disable validation await submit(action, { validate: false });
By default, we could provide a default validator that functions similar to HTML's client-side validation.
The text was updated successfully, but these errors were encountered:
Support for client-side validation
85438a7
Resolves #16
dillonredding
Successfully merging a pull request may close this issue.
When submitting an action, there should be an option to enable/customize client-side validation.
By default, we could provide a default validator that functions similar to HTML's client-side validation.
The text was updated successfully, but these errors were encountered: