mirror of
				https://github.com/Icinga/icingaweb2.git
				synced 2025-10-31 11:24:51 +01:00 
			
		
		
		
	Show the expected input format if a date-and-time input is not valid
refs #6778
This commit is contained in:
		
							parent
							
								
									b5a0f7950e
								
							
						
					
					
						commit
						ab7c529094
					
				| @ -5,7 +5,6 @@ namespace Icinga\Web\Form\Validator; | |||||||
| 
 | 
 | ||||||
| use DateTime; | use DateTime; | ||||||
| use Zend_Validate_Abstract; | use Zend_Validate_Abstract; | ||||||
| use Icinga\Util\DateTimeFactory; |  | ||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * Validator for date-and-time input controls |  * Validator for date-and-time input controls | ||||||
| @ -68,7 +67,7 @@ class DateTimeValidator extends Zend_Validate_Abstract | |||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|             if ($dateTime === false || $dateTime->format($format) !== $value) { |             if ($dateTime === false || $dateTime->format($format) !== $value) { | ||||||
|                 $this->_error(self::INVALID_DATETIME_FORMAT, DateTimeFactory::create()->format($baseFormat)); |                 $this->_error(self::INVALID_DATETIME_FORMAT, $baseFormat); | ||||||
|                 return false; |                 return false; | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user