updated regex validation