added date+time check

This commit is contained in:
Roland Gruber 2018-06-29 20:43:10 +02:00
parent fdca95bd3b
commit 237ba66711
1 changed files with 3 additions and 0 deletions

View File

@ -549,6 +549,9 @@ function get_preg($argument, $regexp) {
case 'date2': case 'date2':
$pregexpr = '/^((0[1-9])|([1-2][0-9])|30|31)\\.((0[1-9])|(1[0-2]))\\.[1-3][0-9][0-9][0-9]$/'; $pregexpr = '/^((0[1-9])|([1-2][0-9])|30|31)\\.((0[1-9])|(1[0-2]))\\.[1-3][0-9][0-9][0-9]$/';
break; break;
case 'dateTime':
$pregexpr = '/^[1-3][0-9][0-9][0-9]\\-((0[1-9])|(1[0-2]))\\-((0[1-9])|([1-2][0-9])|30|31) ((0[0-9])|([1][0-9])|20|21|22|23):((0[0-9])|([1-5][0-9])):((0[0-9])|([1-5][0-9]))$/';
break;
case 'sambaLogonHours': case 'sambaLogonHours':
$pregexpr = '/^[0-9a-fA-F]{42}$/'; $pregexpr = '/^[0-9a-fA-F]{42}$/';
break; break;