You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+69-67Lines changed: 69 additions & 67 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,69 @@ Leverage CommandBox to install:
25
25
26
26
`box install cbvalidation`
27
27
28
-
The module will register several objects into WireBox using the `@cbvalidation` namespace. The validation manager is registered as `ValidationManager@cbvalidation`. It will also register several helper methods that can be used throughout the ColdBox application.
28
+
The module will register several objects into WireBox using the `@cbvalidation` namespace. The validation manager is registered as `ValidationManager@cbvalidation`. It will also register several helper methods that can be used throughout the ColdBox application: `validate(), validateOrFail(), getValidationManager()`
29
+
30
+
## Mixins
31
+
32
+
The module will also register several methods in your handlers/interceptors/layouts/views
33
+
34
+
```js
35
+
/**
36
+
* Validate an object or structure according to the constraints rules.
37
+
*
38
+
* @target An object or structure to validate
39
+
* @fields The fields to validate on the target. By default, it validates on all fields
40
+
* @constraints A structure of constraint rules or the name of the shared constraint rules to use for validation
41
+
* @locale The i18n locale to use for validation messages
42
+
* @excludeFields The fields to exclude from the validation
43
+
* @includeFields The fields to include in the validation
0 commit comments