File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -40,12 +40,10 @@ public function validate(array|string|null $values): array|bool
4040            return  false ;
4141        }
4242
43-         $ startDate$ this createCarbonDate ($ returnedValues'minDate ' ]);
44-         $ endDate$ this createCarbonDate ($ returnedValues'maxDate ' ]);
45- 
46-         if  (! ($ startDateinstanceof  Carbon) || ! ($ endDateinstanceof  Carbon)) {
43+         if  (! (($ startDate$ this createCarbonDate ($ returnedValues'minDate ' ])) instanceof  Carbon) || ! (($ endDate$ this createCarbonDate ($ returnedValues'maxDate ' ])) instanceof  Carbon)) {
4744            return  false ;
4845        }
46+         
4947        if  ($ startDategt ($ endDate
5048            return  false ;
5149        }
Original file line number Diff line number Diff line change @@ -453,5 +453,10 @@ public function test_can_check_validation_rejects_invalid_values_array(): void
453453    public  function  test_can_check_validation_rejects_broken_values_array (): void 
454454    {
455455        $ this assertFalse (self ::$ filterInstancevalidate (['minDate '  => 'asdf ' , 'maxDate '  => '2020-02-02 ' ]));
456+         $ this assertFalse (self ::$ filterInstancevalidate (['minDate '  => '4121-31-31 ' , 'maxDate '  => '2020-02-02 ' ]));
457+         $ this assertFalse (self ::$ filterInstancevalidate (['minDate '  => '2020-02-02 ' , 'maxDate '  => 'asdf ' ]));
458+         $ this assertFalse (self ::$ filterInstancevalidate (['minDate '  => '2020-02-02 ' , 'maxDate '  => '4121-31-31 ' ]));
459+ 
460+ 
456461    }
457462}
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments