0.1.30 • Published 3 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
3 years ago
0.1.27
3 years ago
0.1.28
3 years ago
0.1.29
3 years ago
0.1.21
3 years ago
0.1.22
3 years ago
0.1.23
3 years ago
0.1.24
3 years ago
0.1.25
3 years ago
0.1.26
3 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
4 years ago
0.1.8
4 years ago
0.1.7
4 years ago
0.1.9
4 years ago
0.1.6
4 years ago
0.1.5
4 years ago
0.1.4
4 years ago
0.1.3
4 years ago
0.1.2
4 years ago
0.1.1
4 years ago
0.1.0
4 years ago