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

Allow values to be trimmed before checking #23

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

limking24
Copy link
Contributor

Currently, both NotNullableValidator and TextFormatValidator cannot prevent values containing only whitespace. Even though IsRequired is set, the former validator uses IsNullOrEmpty, which means whitespace is allowed. I tried to use Pattern instead, only to realize the latter validator will not execute the regular expression unless the value to be checked is not null or whitespace. To avoiding making a change that would affect the current users, I've added the ability to trim data before doing a validation.

limking24 and others added 4 commits October 26, 2022 15:28
Add "hasHeaderRow" into the sample and change "isUnique" to "unique" (according to ColumnValidatorConfiguration.cs.)
@limking24 limking24 changed the title Patch 1 Allow values to be trimmed before checking Nov 4, 2022
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.

None yet

1 participant