0.1.30 • Published 4 years ago
@fvillard/reactinput v0.1.30
ReactInput
Input package with validation
Phone and Address type are custum for Switzerland use
Usage
Import
import Input from '@fvillard/reactinput'Declaration
<Input
/>Default props
| Props | Description | Default value |
|---|---|---|
| *id | string Text showed above input | "" |
| label | string Text showed above input | "" |
| placeHolder | string Text showed into input | "" |
| type | string 'text','email','phone','password','file' | "text" |
| value | string value of input | "" |
| *onChange | function see #onChange section | "function(){}" |
| onKeyDown | function see #onKeyDown section | "function(){}" |
| required | boolean Throw error if empty | false |
| disabled | boolean disible input | false |
onChange
return function(id, value, error);
Type "text" additionals props
| Props | Description | Default value |
|---|---|---|
| min | integer min value lenght | null |
| max | integer max value lenght | null |
Type "text" additionals props
| Props | Description | Default value |
|---|---|---|
| min | integer min value lenght | null |
| max | integer max value lenght | null |
| precision | integer number of float value | 0 |
Type "password" additionals props
| Props | Description | Default value |
|---|---|---|
| level | integer difficulty of password (1-3) | 0 (no control) |
level definition
level 1
Password lenght must be >= 5
level 2
Password lenght must be >= 6 Password need use letter and number
level 3
Password lenght must be >= 8 Password need use letter and number and special char
Type "file" additionals props
onChange
return function(id, content, error);
0.1.30
4 years ago
0.1.27
4 years ago
0.1.28
4 years ago
0.1.29
4 years ago
0.1.21
4 years ago
0.1.22
4 years ago
0.1.23
4 years ago
0.1.24
4 years ago
0.1.25
4 years ago
0.1.26
4 years ago
0.1.20
4 years ago
0.1.16
4 years ago
0.1.17
4 years ago
0.1.18
4 years ago
0.1.19
4 years ago
0.1.15
4 years ago
0.1.14
4 years ago
0.1.13
4 years ago
0.1.11
4 years ago
0.1.12
4 years ago
0.1.10
5 years ago
0.1.8
5 years ago
0.1.7
5 years ago
0.1.9
5 years ago
0.1.6
5 years ago
0.1.5
5 years ago
0.1.4
5 years ago
0.1.3
5 years ago
0.1.2
5 years ago
0.1.1
5 years ago
0.1.0
5 years ago