Announcement

Collapse
No announcement yet.

URL field does not accept "~" on Version 8.0.5 [Not valid for newer versions]

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • URL field does not accept "~" on Version 8.0.5 [Not valid for newer versions]

    I'm currently on version 8.0.5, and it looks like the url field does not accept "~".

    It accepts it on the EspoCRM Live Demo which is on Version 8.4.2.

    It seems to be something related to the Validation of the URL field. But, I'm not able to point to what has changed exactly.

    I'm a single person team and I won't be able to upgrade versions further at the moment.

    Can someone please help me understand what has changed and/or how the validation of fields works on EspoCRM?

    Thanks in advance!


  • #2
    The Url Field performs validation in src/view/url.js in validateValid() method.
    The method uses Resources/metadata/app/regExpPatterns.json -> uriOptionalProtocol -> pattern to validate the submitted url.

    Updating the pattern to "([a-zA-Z0-9]+\\:\\/\\/)?[a-zA-Z0-9%\\.\\/\\?\\:@\\-_=#$!+*\\(\\)',]+\\.([a-zA-Z0-9%\\&\\.\\/\\?\\:@\\-_=#$!+*\\(\\)',~])*" fixed the issue.
    This is a temporary fix up until I upgrade.

    Comment

    Working...
    X