Not signed in (Sign In)

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthormanouman
    • CommentTimeMar 25th 2008
     
    Hi, i'm trying to check using an input file if the "uploaded" file is .jpg.

    my example: <input type="file" size="50" name="archivos[]" class="validate-custom/\.(jpg|JPG|jpeg|JPEG)/"/>

    but it does not work.
    Somebody can help me?
    Thanks, Manu.
    • CommentAuthordbuschho
    • CommentTimeMar 26th 2008
     
    Could you provide your OS, browser, and general computer stats?
    • CommentAuthordbuschho
    • CommentTimeMar 26th 2008
     
    Also are you using formassembly or the wforms library?
    • CommentAuthormanouman
    • CommentTimeMar 26th 2008
     
    dbuschho, I am using wforms library and I found the error ..... :$ ..... missing space between validate-custom and the /reg_exp/
    so, the correct is:
    <input type="file" size="50" name="archivos[]" class="validate-custom /\.(jpg|JPG|jpeg|JPEG)/"/>

    I'm using Ubuntu Feisty and Firefox.

    Another thing...
    If I don't want to upload a file, automatically takes it as required (because it doesn't ends in jpg) displaying me the current error, so changing the reg_exp as:
    class="validate-custom /(^|\.jpg)$/i"

    We would be indicating that there is a string and it's ending in jpg.
    NOTE: /i <- case sensitive

    I hope it help to someone.

    I'm Argentinian, my english sucks.
    Thanks!
    Manu