@traveloka/validation
Advanced tools
Comparing version 3.1.3 to 3.1.6
@@ -6,2 +6,11 @@ # Change Log | ||
<a name="3.1.6"></a> | ||
## [3.1.6](https://github.com/Jekiwijaya/react-schema/compare/v3.1.5...v3.1.6) (2019-01-16) | ||
**Note:** Version bump only for package @traveloka/validation | ||
<a name="3.1.3"></a> | ||
@@ -8,0 +17,0 @@ ## [3.1.3](https://github.com/Jekiwijaya/react-schema/compare/v3.1.2...v3.1.3) (2018-10-19) |
{ | ||
"name": "@traveloka/validation", | ||
"version": "3.1.3", | ||
"version": "3.1.6", | ||
"main": "lib/index.js", | ||
@@ -5,0 +5,0 @@ "types": "./lib/index.d.ts", |
@@ -12,1 +12,24 @@ # React Schema | ||
``` | ||
## Rules | ||
- `required` | ||
- `maxLength(length: number)` | ||
- `or(rules: Rule | Rule[])` | ||
## Example study case | ||
- Password length minimal 5 character | ||
- Password must contain at least one symbol or number | ||
```typescript | ||
<Field | ||
component={TextInput} | ||
rules={[ | ||
minLength(5), | ||
or([ | ||
containSymbol, | ||
containNumber | ||
]) | ||
]} /> | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
140770
35