Remove dynamically constraints #46
Comments
This can easily be implemented. But what is your use case (besides freeing some memory)? This would be interesting to know to have an API that makes sense. I'd suggest |
Yes I agree with you and perhaps I am doing an error. I need to remove constraints in order to adapt my validation following the context. When I select a specific field, constraints change |
In same idea, it would be the same with customs validators |
I don't think that removing a validator makes sense, or do you see a use case where removing/altering the constraints would not work? |
no it's a mistake of me. And for valdr.addConstrants({ 'YourType': {}}). it's already done !^^ |
can valdr validate variable data which varies per server request. for example OTP changes its length from 3 to 6 chars long. can I validate the user input data against the server fetched otp data. |
Now we can add constraints via the method valdr.addConstraints(...), why not have a method removeConstraints(...) ?
The text was updated successfully, but these errors were encountered: