mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* Add function definition to ValidationRule
ValidationRule is a function that takes in parameters and then applies them to the inner validator function. The types are currently missing that allow this behavior. This is most useful when building composed functions out of the built-in validators, like so:
```typescript
export const greaterThanZero: ValidationRule = and(minValue(0), not((value: UserInput) => value == 0))
export const greaterThanOrEqualToZero: ValidationRule = minValue(0)
```
Vuelidate "withParams" reference that returns a ValidationRule function:
|
||
|---|---|---|
| .. | ||
| lib | ||
| index.d.ts | ||
| package.json | ||
| tsconfig.json | ||
| tslint.json | ||
| vue.d.ts | ||
| vuelidate-tests.ts | ||
| vuelidate.d.ts | ||