Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ismail Mayat 4511 posts 10090 karma points MVP 2x admin c-trib
    May 11, 2018 @ 10:53
    Ismail Mayat
    0

    PerplexImageUpload client side validation not firing

    I have form with 3 PerplexImageUpload controls. They are all mandatory when i submit with out setting images i do not see client side validation error message. Only see it after form is submitted. Am I missing something?

    Regards

    Ismail

  • Daniël Knippers 153 posts 1116 karma points MVP 2x c-trib
    May 15, 2018 @ 08:07
    Daniël Knippers
    0

    Hi Ismail,

    No idea, when I try it the validation message trigger propertly before the submit (see the attachment). Can you check the rendered input elements have the data-val-required attributes rendered? Everything else should be handled by default jQuery unobtrusive validation. Did you include those scripts as well?

    Regards, Daniel

    validation messages

  • Ismail Mayat 4511 posts 10090 karma points MVP 2x admin c-trib
    May 15, 2018 @ 08:09
    Ismail Mayat
    0

    output of markup looks like:

    <input type="file" name="d151eb57-de21-4ea9-e4fa-9ccbb7b9eb13" id="d151eb57-de21-4ea9-e4fa-9ccbb7b9eb13" data-val="true" data-val-required="No image">
    

    Regards

    Ismial

  • Daniël Knippers 153 posts 1116 karma points MVP 2x c-trib
    May 15, 2018 @ 11:44
    Daniël Knippers
    0

    Looks fine to me, jQuery unobtrusive validation should pick it up, if it's loaded. Can you verify some version of jquery.validate.unobtrusive is loaded? Otherwise none of the unobtrusive validation works.

    It's likely when it does not work for our field types the unobtrusive validation does not work for any of Umbraco Form's built-in fieldtypes, can you check that out as well?

    Regards, Daniël

  • Ismail Mayat 4511 posts 10090 karma points MVP 2x admin c-trib
    May 15, 2018 @ 12:28
    Ismail Mayat
    0

    Daniel,

    Its referencing jquery validate 1.13.1

    Regards

    Ismail

  • Daniël Knippers 153 posts 1116 karma points MVP 2x c-trib
    May 15, 2018 @ 12:42
    Daniël Knippers
    0

    Ismail,

    That's jquery.validate, but you also need jquery.validate.unobtrusive. It really sounds like you are simply missing that include. If you copy the scripts from the Umbraco documentation into your Master / Layout page, I think it should immediately work:

    https://our.umbraco.org/documentation/Add-ons/umbracoforms/developer/Prepping-Frontend/

    -- Daniël

Please Sign in or register to post replies

Write your reply to:

Draft