You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
***validate_date** — *yyyy-mm-dd (format can be customized, more information below)*
30
-
***validate_birthdate** — *yyyy-mm-dd, not allowing dates in the future or dates that is older then 122 years (format can be customized, more information below)*
31
46
***validate_email**
32
-
***validate_time** — *hh:mm*
33
47
***validate_domain** — *domain.com*
34
48
***validate_phone** — *atleast 7 digits only one hyphen and plus allowed*
35
-
***validate_swemob** — *validate that the value is a swedish mobile telephone number*
36
49
***validate_float**
37
50
***validate_int**
51
+
***validate_date** — *yyyy-mm-dd (format can be customized, more information below)*
38
52
***validate_length** — *Validate that input length is in given range (length3-20)*
53
+
<<<<<<< .merge_file_MDtscE
39
54
***validate_confirmation**
40
55
***validate_spamcheck**
41
56
***validate_ukvatnumber**
42
57
***validate_swesec** — *validate swedish social security number*
58
+
=======
59
+
>>>>>>> .merge_file_lzk9nf
43
60
***required** — *no validation except that a value has to be given*
44
61
***validate_custom** — *Validate value against regexp (validate_custom regexp/^[a-z]{2} [0-9]{2}$/)
45
62
***validate_num_answers** — *Validate that a select element has the required number of selected options (validate_num_answers num5)*
46
63
64
+
### Module: security
65
+
***validate_spamcheck**
66
+
***validate_confirmation**
67
+
***validate_strength** — *Validate the strength of a password (validate_strength strength3)*
68
+
***validate_backend** — *Validate value of input on backend*
69
+
70
+
### Module: date
71
+
***validate_time** — *hh:mm*
72
+
***validate_birthdate** — *yyyy-mm-dd, not allowing dates in the future or dates that's older than 122 years (format can be customized, more information below)*
73
+
74
+
### Module: location
75
+
***validate_country**
76
+
***validate_federatestate**
77
+
***validate_longlat**
78
+
* Suggest countries (english only)
79
+
* Suggest states in the US
80
+
81
+
### Module: sweden
82
+
***validate_swemob** — *validate that the value is a swedish mobile telephone number*
83
+
***validate_swesec** — *validate swedish social security number*
84
+
***validate_county** - *validate that the value is an existing county in Sweden*
85
+
***validate_municipality** - *validate that the value is an existing municipality in Sweden*
86
+
* Suggest county
87
+
* Suggest municipality
88
+
89
+
### Module: ukvat
90
+
***validate_ukvatnumber**
91
+
92
+
### Misc (part of core)
47
93
* Show help information automatically when input is focused
48
94
* Validate given values immediately when input is blurred.
95
+
<<<<<<< .merge_file_MDtscE
49
96
* Make validation optional by adding attribute data-validation-optional="true" to the element. This means that the validation defined in data-validation only will take place in case a value is given.
50
97
* Make validation dependent on another input of type checkbox being checked by adding attribute data-validation-if-checked="name of checkbox input"
98
+
=======
99
+
* Make validation optional by adding attribute data-validation-optional="true" to the element. This means
100
+
that the validation defined in data-validation only will take place in case a value is given.
101
+
* Make validation dependent on another input of type checkbox being checked by adding attribute
102
+
data-validation-if-checked="name of checkbox input"
103
+
* Create input suggestions with ease, no jquery-ui needed
104
+
105
+
106
+
## Writing a custom validator
107
+
You can use the function `$.formUtils.addValidator()` to add your own validation function. Here's an example of a validator
@@ -61,50 +193,53 @@ It is now possible to show that the value of an input is incorrect immediately w
61
193
</p>
62
194
...
63
195
</form>
64
-
65
196
<script>
66
197
$('#my_form').validateOnBlur();
67
198
</script>
68
199
```
69
200
70
201
## Show help information
71
-
Since version 1.1 it is possible to display help information for each input. The information will fade in when input is focused and fade out when input is blurred.
202
+
It is possible to display help information for each input. The information will fade in when input is focused and fade out when input is blurred.
0 commit comments