@stacksjs/validation 0.58.50 → 0.58.52

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/rules.ts +3 -3
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/validation",
3
3
  "type": "module",
4
- "version": "0.58.50",
4
+ "version": "0.58.52",
5
5
  "description": "The Stacks Validation ways.",
6
6
  "author": "Chris Breuer",
7
7
  "license": "MIT",
package/src/rules.ts CHANGED
@@ -28,7 +28,7 @@ export interface FieldContext {
28
28
  /**
29
29
  * Mutate the value of field under validation.
30
30
  */
31
- mutate(newValue: any, field: FieldContext): void
31
+ mutate: (newValue: any, field: FieldContext) => void
32
32
 
33
33
  /**
34
34
  * Report error to the error reporter
@@ -87,12 +87,12 @@ export interface ErrorReporterContract {
87
87
  /**
88
88
  * Creates an instance of an exception to throw
89
89
  */
90
- createError(): Error
90
+ createError: () => Error
91
91
 
92
92
  /**
93
93
  * Report error for a field
94
94
  */
95
- report(message: string, rule: string, field: FieldContext, args?: Record<string, any>): any
95
+ report: (message: string, rule: string, field: FieldContext, args?: Record<string, any>) => any
96
96
  }
97
97
 
98
98
  export const isMoney = validator.createRule((value: unknown, _, field: FieldContext) => {