Appnitro Software Forums » MachForm

URL format validator

(2 posts)

  1. guidoo
    Member

    Dear Support,

    I'd like to disable the URL format validation, so people can enter 'www.domain.com' without 'http://' in front of it. (I already disabled that standard value).

    What should I do? I think I have to edit common-validator.php on line 228..

    Thanks,

    Guido

    Posted 8 months ago #
  2. Hi Guido,

    Yes you're right, you need to edit "common-validator.php" file, around line 228 ~ 230 (inside validate_website function ) you will see these code :

    $regex  = '/^https?:\/\/([a-z0-9]([-a-z0-9]*..

    replace with these

    $regex  = '/^([a-z0-9]([-a-z0-9]*..

    i truncate the code bacause it's to long, actually you only need to remove this code from that line :

    https?:\/\/
    Posted 8 months ago #

RSS feed for this topic

Reply

You must log in to post.