#252, fixing the regex patterns for validation