File tree Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -156,11 +156,23 @@ function ($v) {
156156 'cmdoverflow ' => '/^(\d|\*)$/i '
157157 ];
158158
159- if (!preg_match ($ regEx ['minhour ' ], $ mins )) {
160- $ errors [] = sprintf ("Minutes invalid value: %s " , $ mins );
159+
160+ $ offset = 0 ;
161+ $ mins = explode (', ' , $ mins );
162+ foreach ($ mins as $ min ) {
163+ if (!preg_match ($ regEx ['minhour ' ], $ min )) {
164+ $ errors [] = sprintf ("Minute[%d] invalid value: %s " , $ offset , $ min );
165+ }
166+ ++$ offset ;
161167 }
162- if (!preg_match ($ regEx ['minhour ' ], $ hours )) {
163- $ errors [] = sprintf ("Hours invalid value: %s " , $ hours );
168+
169+ $ offset = 0 ;
170+ $ hours = explode (', ' , $ hours );
171+ foreach ($ hours as $ hour ) {
172+ if (!preg_match ($ regEx ['minhour ' ], $ hour )) {
173+ $ errors [] = sprintf ("Hour[%d] invalid value: %s " , $ offset , $ hour );
174+ }
175+ ++$ offset ;
164176 }
165177
166178 $ offset = 0 ;
You can’t perform that action at this time.
0 commit comments