correcting regex for validation