UNPKG

@emcsistemas/native-ui

Version:
7 lines (6 loc) 424 B
export const REGEX_IP = /^(?:(?:25[0-5]|2[0-4]\d|1?\d?\d)(?:\.(?!$)|$)){4}$/ export const REGEX_URL = /^(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})(\/[\w]*)*$/ export const REGEX_EMAIL = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ export const REGEX_PHONE = /^(\+55)?[\s]?\(?(\d{2})?\)?[\s-]?(9?\d{4}[\s-]?\d{4})$/