preg test and some common validations