Replies: 2 comments
-
Hi @Vongalin ! I'm sorry it took me so long to reply, I was a bit out of open-source for a while, and I completely missed the GitHub Discussions! What did you end up doing in the end? Personally, I use Validation more for complex validations. I think a |
Beta Was this translation helpful? Give feedback.
0 replies
-
It's been a while that there are no comments here. I'm closing this discussion for now, but feel free to open it whenever you want! 🐼 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi! Thank you so much for creating this wonderful package. Slowly, I have transitioned the validations in my code over to this package (an internal site only). So far I haven't run into any major issues or setbacks; however, I'm not sure if I am doing this one particular type of validation correctly.
My original code was this :
if ($postalcode === "") {
I then tested and was using this :
if (v::stringType()->max(0)->validate($postalcode)) {
and then finally have settled on this :
if (v::not(v::notBlank())->validate($postalcode)) {
Is my current usage the best/proper way to validate blank/empty strings ? I was hoping to find something along the lines of isBlank but I didn't see anything in the documentation nor did I find anything else that I could use.
Thank you for any suggestions that you may have !
Beta Was this translation helpful? Give feedback.
All reactions