Untitled
unknown
plain_text
3 years ago
261 B
4
Indexable
checkIsUrl(element, field) { const regexp = new RegExp(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)?/gi) if (!field.match(regexp)) { throw [element, null, i18n.t('validator.url', [field])]; } }
Editor is loading...