Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix wrong type received by "KeySet" rule
I've defined the type that `KeySet` would receive as `Key` because, in fact, it should only accept `Key` rules. However, the `Validator::__callStatic()` method (called when you run `v::key(...)`) will create an instance of itself, not the instance of `Key`, and that's because you might want to add more rules to the chain. Knowing that, we did some workaround in which `KeySet` will check if the given rules are either a `Key` or a `Validator` with only one Key rule. This commit will replace the type from `Key` to `Validatable`, and let the implementation deal with the wrong type.
- Loading branch information