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
Great library, much appreciated!
That said, I can't find any docs on the validate function except:
It doesn't say what to return to influence the error creation etc.
I asked copilot and it suggested:
rules={{ required: 'required', validate: (value) => { if (value.split(' ').length > 1) { return 'no spaces allowed' } return true; } }}
But it seems the return true may not be necessary? This seems to work fine?
rules={{ required: 'required', validate: (value) => { if (value.split(' ').length > 1) return 'no spaces allowed' } }}
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Great library, much appreciated!
That said, I can't find any docs on the validate function except:
It doesn't say what to return to influence the error creation etc.
I asked copilot and it suggested:
But it seems the return true may not be necessary? This seems to work fine?
The text was updated successfully, but these errors were encountered: