/*Date validation, fixed regex for formats which use dash as separator: 
added $regexp = preg_replace('/(?<=(\]|\)))'.$separator.'(?=(\[|\())/i', "\\" . $separator, $regexp); to escape dash only between groups.
Removed optional two digits year and one digit day or month to fit MySQL date format requirement */