Skip to content

Commit 1e9018e

Browse files
committed
Update readme
1 parent 31f8157 commit 1e9018e

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,11 @@ Below is list of all available validation rules
264264

265265
* [required](#rule-required)
266266
* [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)
267272
* [uploaded_file](#rule-uploaded_file)
268273
* [email](#rule-email)
269274
* [alpha](#rule-alpha)
@@ -316,6 +321,31 @@ The field under this rule must be present and not empty if the anotherfield fiel
316321

317322
For example `required_if:something,1,yes,on` will be required if `something` value is one of `1`, `'1'`, `'yes'`, or `'on'`.
318323

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+
319349
<a id="rule-uploaded_file"></a>
320350
#### uploaded_file:min_size,max_size,file_type_a,file_type_b,...
321351

0 commit comments

Comments
 (0)