You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I saw it in the Issues #256#499#503.
I have the same problem when executing a .test (value), I have the error that the value is undefined, it happens because the tests are all done in parallel, and I think this has to be maintained, but this can cause some problems, Sequential checks are a good solution as said in these Issues but losing performance and can be costly to develop.
But I think a more efficient solution would be to run .required () before any other check, because if the variable doesn't exist you don't have to run everything in parallel and still solve the problems mostly of .test ()
The text was updated successfully, but these errors were encountered:
I've considered this a few times, for most cases it'd be slightly simple to write tests, however there isn't any reason that all custom tests would want to only operate on present values, for instance if you wanted to differentiate between null and undefined. It's annoying to have to check in every test but not so much so i think that we need to avoid it. We can maybe make it configurable but idk if that's worth the effort
The issue is not the job of checking each item in the test, but of the return of validation.
Example: I go to the test and check if it is undefined, then it will return me the error of the test, but in fact the error is isRequired.
Another solution would be, I have how to write the error return in the test check, for example if undefined I write an isRequired error, if it is not undefined and not passed I write the test error.
I saw it in the Issues #256 #499 #503.
I have the same problem when executing a .test (value), I have the error that the value is undefined, it happens because the tests are all done in parallel, and I think this has to be maintained, but this can cause some problems, Sequential checks are a good solution as said in these Issues but losing performance and can be costly to develop.
But I think a more efficient solution would be to run .required () before any other check, because if the variable doesn't exist you don't have to run everything in parallel and still solve the problems mostly of .test ()
The text was updated successfully, but these errors were encountered: