@@ 127-131 (lines=5) @@ | ||
124 | ||
125 | $rules[] = 'date_format:' . $this->date_format; |
|
126 | ||
127 | if (!is_null($this->date_min)) |
|
128 | { |
|
129 | $date = Carbon::createFromFormat($this->date_format, $this->date_min)->subDay()->format($this->date_format); |
|
130 | $rules[] = 'after:' . $date; |
|
131 | } |
|
132 | ||
133 | if (!is_null($this->date_max)) |
|
134 | { |
|
@@ 133-137 (lines=5) @@ | ||
130 | $rules[] = 'after:' . $date; |
|
131 | } |
|
132 | ||
133 | if (!is_null($this->date_max)) |
|
134 | { |
|
135 | $date = Carbon::createFromFormat($this->date_format, $this->date_max)->addDay()->format($this->date_format); |
|
136 | $rules[] = 'before:' . $date; |
|
137 | } |
|
138 | ||
139 | $validator->mergeRules($this->identifier, $rules); |
|
140 |