form-validator
form-validator copied to clipboard
using `required()` on an `optional` field does nothing
Describe the bug
I am using global validator builder, because i want to have the same locale everywhere. bue i have noticed that whenever i am using the optional: true
parameter, it overrides future required()
method. i feel like it should not be an intended behaviour since the constructor of ValidationBuilder
is using required()
if (!optional) required(requiredMessage);
it should base only on that or change flag optional
when we are using required()