summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorAsko Nõmm <asko@repl.ee>2023-09-25 01:38:07 +0300
committerAsko Nõmm <asko@repl.ee>2023-09-25 01:38:07 +0300
commitf64bee5818f1795043bf3aff74fee2ca82eda185 (patch)
treec33c1b96d0f79f1bb217a19e42a6ab7336342625 /README.md
parentef1dd318d437bb33adddf226c546e85f4744ce8c (diff)
Update README
Diffstat (limited to 'README.md')
-rw-r--r--README.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/README.md b/README.md
index 32b3fb4..0eec3d4 100644
--- a/README.md
+++ b/README.md
@@ -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)`.