@@ -264,6 +264,11 @@ Below is list of all available validation rules
264
264
265
265
* [ required] ( #rule-required )
266
266
* [ required_if] ( #rule-required_if )
267
+ * [ required_unless] ( #rule-required_unless )
268
+ * [ required_with] ( #rule-required_with )
269
+ * [ required_without] ( #rule-required_without )
270
+ * [ required_with_all] ( #rule-required_with_all )
271
+ * [ required_without_all] ( #rule-required_without_all )
267
272
* [ uploaded_file] ( #rule-uploaded_file )
268
273
* [ email] ( #rule-email )
269
274
* [ alpha] ( #rule-alpha )
@@ -316,6 +321,31 @@ The field under this rule must be present and not empty if the anotherfield fiel
316
321
317
322
For example ` required_if:something,1,yes,on ` will be required if ` something ` value is one of ` 1 ` , ` '1' ` , ` 'yes' ` , or ` 'on' ` .
318
323
324
+ <a id =" rule-required_unless " ></a >
325
+ #### required_unless: another_field ,value_1,value_2,...
326
+
327
+ The field under validation must be present and not empty unless the anotherfield field is equal to any value.
328
+
329
+ <a id =" rule-required_with " ></a >
330
+ #### required_with: field_1 ,field_2,...
331
+
332
+ The field under validation must be present and not empty only if any of the other specified fields are present.
333
+
334
+ <a id =" rule-required_without " ></a >
335
+ #### required_without: field_1 ,field_2,...
336
+
337
+ The field under validation must be present and not empty only when any of the other specified fields are not present.
338
+
339
+ <a id =" rule-required_with_all " ></a >
340
+ #### required_with_all: field_1 ,field_2,...
341
+
342
+ The field under validation must be present and not empty only if all of the other specified fields are present.
343
+
344
+ <a id =" rule-required_without_all " ></a >
345
+ #### required_without_all: field_1 ,field_2,...
346
+
347
+ The field under validation must be present and not empty only when all of the other specified fields are not present.
348
+
319
349
<a id =" rule-uploaded_file " ></a >
320
350
#### uploaded_file: min_size ,max_size,file_type_a,file_type_b,...
321
351
0 commit comments