As you can see, the first argument sets the name for the rule and the second is
the actual validator function. The value to validate is being passed to the
validator function, which should return true if the check passes or false
if it doesn't.

You can now use isYesString exactly as you'd use string, notEmpty or
any other rule:

If you are calling validate inside a named function, it will automatically
find the function's name. However, if you call it inside an anonymous function
or a class method, it will only show anonymous function as a reference on a
failed validation.
To avoid this, simply pass the function-/methodname as first parameter:

maat should be small and easy to use. It should not include unnecessary logic
but instead let the user add the custom rules he desires.
Also, it should not consume much space in a function. That's why I prefer
an array notation over an object one.