-
Notifications
You must be signed in to change notification settings - Fork 0
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
Priority of the empty
test validation
#3
Comments
Can you provide a commented example of this situation? Would be helpful to understand the issue. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The empty test is prior to all other tests, as it makes little sense to test for any other test when the field is just an empty string. Hence, this test aborts the other tests on a value when an empty string is encountered. It will simplify the implementation, as the other tests do not have to take into account the possibility of getting an empty string as input value. it will also diminish processing time (all empty values are faster evaluated with just a single test).
However, this has a major drawback as well:
When a conditional test is added (
if
) that includes the specification to decide when empty strings are allowed or not, this model runs into trouble. It requires to add a generalempty
test as well (empty is - sometimes - possible) and the priority of theempty
test will stop the other tests, i.e. theif
test is never started.Therefore, we could decide about having the empty-test not as first priority test. This should be balanced against:
The text was updated successfully, but these errors were encountered: