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 believe that the verification logic for validator modules is missing a case for validators that use validate/3 instead of validate/2.
Technically, how I perceive the logic to be working is:
validate/3 is called at runtime
use Vex.Validator defines a default validate/3 that delegates to validate/2, discarding the context attribute
When looking up validators by name (done in Vex.validator/1), Vex.Validator.Sources encodes what is considered a complete validator module: exporting validate/2
However, this verification assumes that validate/3 is the not overridden and the default implementation delegates to validate/2, otherwise it would be perfectly reasonable to not have validate/2 and instead just defining validate/3
The text was updated successfully, but these errors were encountered:
I believe that the verification logic for validator modules is missing a case for validators that use
validate/3
instead ofvalidate/2
.Technically, how I perceive the logic to be working is:
validate/3
is called at runtimeuse Vex.Validator
defines a defaultvalidate/3
that delegates tovalidate/2
, discarding thecontext
attributeVex.validator/1
),Vex.Validator.Sources
encodes what is considered a complete validator module: exportingvalidate/2
However, this verification assumes that
validate/3
is the not overridden and the default implementation delegates tovalidate/2
, otherwise it would be perfectly reasonable to not havevalidate/2
and instead just definingvalidate/3
The text was updated successfully, but these errors were encountered: