regex validate field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2023 06:41 AM
I am using onSubmit client script to validate the three (dev_endpoint, prod_endpoint and test end point) field values with regex. But not sure its not working well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2023 09:08 AM
Can you please share sample URL for all 3 environments which are valid & non-valid?
Looking at the script doesn't make much sense about the requirement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2023 04:10 PM
User has provided these two regex to validate the text :
^https:\/\/[\w\-]+(\.[\w\-]+)+[\/#?]?.*$/;
^(?!.*\.(js|html|css|jpg|jpeg|gif|png|ico|pdf|doc|docx|xls|xlsx|ppt|pptx|csv|txt|xml|json)$)(?!.*\b(get|put|delete)\b)[a-z][a-z0-9_-]*(?:_[a-z0-9]+)*(?:\/[a-z][a-z0-9_-]*(?:_[a-z0-9]+)*)*(?:\/[a-z][a-z0-9_-]*(?:_[a-z0-9]+)*)*(?!.*[\/]$)$