Meta Box
Support › Meta Box AIO › Url Validation "Must Contain"Resolved
Hello,
Hoping you can help me out. ive looked over the docs and cant see how to get the following
im looking to set up social links and want each url to validate. ie facebook url must contain 'facebook'
and also would like to know how to exclude text ie facebook url must not contain 'gtm'
Hello Matthew,
You can use the custom attribute HTML5 pattern and set a regex to validate the URL: - url must contain 'facebook' - url must not contain 'gtm'
pattern
here is an example: ^(?=.*facebook)(?!.*gtm).*$ https://imgur.com/UuHDmzr
^(?=.*facebook)(?!.*gtm).*$
Following the documentation https://docs.metabox.io/custom-attributes/
Peter,
Worked a treat Thank you and Appreciated for the fast reply 🙂