diff options
| author | Asko Nõmm <asko@repl.ee> | 2023-09-25 01:38:07 +0300 |
|---|---|---|
| committer | Asko Nõmm <asko@repl.ee> | 2023-09-25 01:38:07 +0300 |
| commit | f64bee5818f1795043bf3aff74fee2ca82eda185 (patch) | |
| tree | c33c1b96d0f79f1bb217a19e42a6ab7336342625 /README.md | |
| parent | ef1dd318d437bb33adddf226c546e85f4744ce8c (diff) | |
Update README
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -142,4 +142,4 @@ class EmailValidator implements Validator You can see that there are two methods, one for validating the `$value` and the other for composing an error message if the validation fails. Both functions take in a `$modifier` argument, which will only have value if the validator is using modifiers. For example, the `len` validator is using modifiers to determine how long of a string should be required, by passing the rule in as `len:{number-of-characters}`. -Once you've created the class for your validator, you can register it by calling `$hird->registerValidator('rule-name', (new YourValidatorClass))`. +Once you've created the class for your validator, you can register it by calling `$hird->registerValidator('rule-name', YourValidator::class)`. |
