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