This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 2

Website validation bug


  1. knitzsche
    Member

    When nothing is entered in a website field that I have on my form where the field is not a required field, I get an error saying that the website is not a valid address. This even happens if I delete the default http:// string that is displayed.

    Kalpana

    Posted 16 years ago #
  2. yuniar

    oops.. I think you found another bug with the website validation.

    Here's how to fix it, edit your includes/common-validator.php file.
    Search around line 223 for this code:

    function validate_website($value) {

    few lines below that code, you'll see this:

    if(!empty($value[0])){

    replace the above code with this one:

    if(!empty($value[0]) && ($value[0] != '/')){

    that should fix it.

    Thanks for reporting this, I'll update the package.


    MachForm Founder

    Posted 16 years ago #
  3. knitzsche
    Member

    Thanks Yuniar!

    Worked like a charm. Your customer support is awesome!

    Kalpana

    Posted 16 years ago #

RSS feed for this topic

Reply