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
{{ message }}
This repository was archived by the owner on Jul 1, 2020. It is now read-only.
1.5.2 (2016-06-14) Fixed #121 Alternate text containing the char ":" was causing unexpected displayed message.
4
5
1.5.1 (2016-03-10) Fixed #111 Add US phone number & tweaked credit card rules.
5
6
1.5.0 (2016-03-10) BREAKING CHANGE when fixing casing issue #107, ValidationService should start with uppercase. Changed to branch 1.5.x to announce major change.
*`date_iso` Ensure date follows the ISO format (yyyy-mm-dd)
159
160
*`date_iso_between:d1,d2` Ensure date follows the ISO format and is between (d1) & (d2)
@@ -175,55 +176,62 @@ All validators are written as `snake_case` but it's up to the user's taste and c
175
176
*`date_us_short_between:d1,d2` Date must follow the US short format and is between (d1) & (d2)
176
177
*`date_us_short_max:d` Date must follow US short format and is lower or equal than date (d)
177
178
*`date_us_short_min:d` Date must follow US short format and is higher or equal than date (d)
178
-
*`different`alias of `different_input`
179
+
*`different`Alias of `different_input`
179
180
*`different_input:f` Must be different from another input field(f), where (f) must be the exact ngModel attribute of input field to compare to. The error message will use the input name or the `friendly-name` if it was provided on first input, ex.: `<input friendly-name="First Name".../>` will display :: *Field must be different from specified field "First Name"*.
180
181
*`different_input:f,t` Must be different from another input field(f), same as (different:f) but also include (t) for alternate input name to be displayed in the error message (it still uses a generic error message, if you really wish to replace the full error message then you should use `match:n:alt` see [:alt](https://github.com/ghiscoding/angular-validation/wiki/Alternate-Text-on-Validators))
181
182
*`digits:n` Ensures that field only has integer numbers and length precisely matches the specified length (n).
182
183
*`digits_between:min,max` Ensures that field only has integer numbers and is between a min,max length.
183
184
*`email` Checks for a valid email address
185
+
*`email_address` Alias of `email`
186
+
*`enum` Alias of `in_list`
184
187
*`exact_len:n` Ensures that field length precisely matches the specified length (n).
185
188
*`float` as to be floating value (excluding integer)
186
189
*`float_signed` Has to be floating value (excluding int), could be signed (-/+) positive/negative.
187
190
*~~`iban`~~ To properly validate an IBAN please use [Wiki - Custom Validation](https://github.com/ghiscoding/angular-validation/wiki/Custom-Validation-functions) with an external library like [Github arhs/iban.js](https://github.com/arhs/iban.js)
188
191
189
-
*`in`alias of `in_list`
192
+
*`in`Alias of `in_list`
190
193
*`in_list:foo,bar,..` Ensures the value is included inside the given list of values. The list must be separated by ',' and also accept words with spaces for example "ice cream".
191
194
*`int` Only positive integer (alias to `integer`).
192
195
*`integer` Only positive integer.
193
196
*`int_signed` Only integer, could be signed (-/+) positive/negative (alias to `integer_signed`).
194
197
*`integer_signed` Only integer, could be signed (-/+) positive/negative.
195
-
*`ip`alias of `ipv4`
198
+
*`ip`Alias of `ipv4`
196
199
*`ipv4` Check for valid IP (IPv4)
197
200
*`ipv6` Check for valid IP (IPv6)
198
201
*`match:f` Match another input field(f), where (f) must be the exact ngModel attribute of input field to compare to. The error message will use the `friendly-name` if it was provided on first input, ex.: `<input friendly-name="Password".../>` will display :: *Confirmation field does not match specified field "Password"*.
199
202
*`match:f,t` Match another input field(f), same as (match:f) but also include (t) for alternate input name to be displayed in the error message (it still uses a generic error message, if you really wish to replace the full error message then you should use `match:n:alt` see [:alt](https://github.com/ghiscoding/angular-validation/wiki/Alternate-Text-on-Validators))
200
-
*`match_input`alias of `match`.
201
-
*`max:n`will auto-detect value type then use proper validator.
203
+
*`match_input`Alias of `match`.
204
+
*`max:n`Will auto-detect value type then use proper validator.
202
205
* Type Number uses `max_num`, String use `max_len`.
203
-
*`max_date_iso`alias of `date_iso_max`.
204
-
*`max_date_euro_long`alias of `date_euro_long_max`.
205
-
*`max_date_euro_short`alias of `date_euro_short_max`.
206
-
*`max_date_us_long`alias of `date_us_long_max`.
207
-
*`max_date_us_short`alias of `date_us_short_max`.
206
+
*`max_date_iso`Alias of `date_iso_max`.
207
+
*`max_date_euro_long`Alias of `date_euro_long_max`.
208
+
*`max_date_euro_short`Alias of `date_euro_short_max`.
209
+
*`max_date_us_long`Alias of `date_us_long_max`.
210
+
*`max_date_us_short`Alias of `date_us_short_max`.
208
211
*`max_len:n` Checks field length, no longer than specified length where (n) is length parameter.
212
+
*`max_length:n` Alias of `max_len`
209
213
*`max_num:n` Checks numeric value to be lower or equal than the number (n).
210
-
*`min:n`will auto-detect value type then use proper validator.
214
+
*`min:n`Will auto-detect value type then use proper validator.
211
215
* Type Number uses `min_num`, String use `min_len`.
212
-
*`min_date_iso`alias of `date_iso_min`.
213
-
*`min_date_euro_long`alias of `date_euro_long_min`.
214
-
*`min_date_euro_short`alias of `date_euro_short_min`.
215
-
*`min_date_us_long`alias of `date_us_long_min`.
216
-
*`min_date_us_short`alias of `date_us_short_min`.
216
+
*`min_date_iso`Alias of `date_iso_min`.
217
+
*`min_date_euro_long`Alias of `date_euro_long_min`.
218
+
*`min_date_euro_short`Alias of `date_euro_short_min`.
219
+
*`min_date_us_long`Alias of `date_us_long_min`.
220
+
*`min_date_us_short`Alias of `date_us_short_min`.
217
221
*`min_len:n` Checks field length, no shorter than specified length where (n) is length parameter.
222
+
*`min_length:n` Alias of `min_len`
218
223
*`min_num:n` Checks numeric value to be higher or equal than the number (n).
219
-
*`not_in`alias of `not_in_list`
224
+
*`not_in`Alias of `not_in_list`
220
225
*`not_in_list:foo,bar,..` Ensures the value is included inside the given list of values. The list must be separated by ',' and also accept words with spaces for example "ice cream".
221
226
*`numeric` Only positive numeric value (float, integer).
222
227
*`numeric_signed` Only numeric value (float, integer) can also be signed (-/+).
223
-
*`pattern` Ensure it follows a regular expression pattern... please see [Regular Expression Pattern](https://github.com/ghiscoding/angular-validation/wiki/Regular-Expression-Pattern)
228
+
*`pattern` Ensure it follows a regular expression pattern... Refer to [Wiki - Regular Expression Pattern](https://github.com/ghiscoding/angular-validation/wiki/Regular-Expression-Pattern) on how to use it.
229
+
*`range` Alias of `between`
224
230
*`required` Ensures the specified key value exists and is not empty
225
-
*`same`alias of `match`.
226
-
*`size`will auto-detect value type then use proper validator.
231
+
*`same`Alias of `match`.
232
+
*`size`Will auto-detect value type then use proper validator.
227
233
* Type Number uses `exact_num`, String use `exact_len`.
234
+
*`string_len` Alias of `between_len`
235
+
*`string_length` Alias of `between_len`
228
236
*`time` Ensure time follows the format of (hh:mm) or (hh:mm:ss)
0 commit comments