Skip to content
New issue

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

FEAT: Optional argument whitespace in the required rule #388

Merged
merged 4 commits into from
Mar 5, 2021

Conversation

atharva3010
Copy link
Contributor

@atharva3010 atharva3010 commented Mar 5, 2021

This PR introduces an optional argument whitespace to the required validation rule.
The parameter has a default value 'pre' which means that the validator will preserve the whitespace in the input and any strings that are only whitespace will pass the validation.
It supports a value 'trim' which trims the whitespace and then the validator evaluates the result. A whitespace only string would not pass the validation in this case.

Note: This only affects the validations, the original input is not modified.
Bonus: This PR also introduces cross-env and updates the test script accordingly.

@justin-schroeder justin-schroeder merged commit a6f066e into wearebraid:release/2.5.2 Mar 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants