Validation is not working

Certified Associate Developer

Hi,

I have created a dynamic form and have set the necessary values to the properties of the fields like this:

required: true,
requiredMessage: "*",
validationGroup: "Questions"

In the Button I also set the necessary properties like this:

submit: true,
validate: true,
validationGroup: "Questions"

In design view validation is working fine. The screenshot:

But when it is running in the site, validation is not working even after clicking the button. The Screenshot:

Can any one please help me regarding this and kindly clarify the reason?

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    "submit" buttons aren't really valid in an interface used directly as a Site page, as there's nothing to "submit" since there is no Task / process instance.  What are you "submitting" here?

    Additionally: it appears as if you have no need for the "validationGroup" parameter.  I would suggest just removing that (unless you already know you require it for reasons outside of the portions of code/screenshots you've included here).  This allows the built-in "required" field indicator to show up in the first place (which has always been a silly side-effect of using this feature).  Honestly I almost never use validation groups since the way it works is finnicky and counterintuitive.  But your primary issue here is probably that you're trying to "submit" stuff while not in a Task.

  • 0
    Certified Associate Developer
    in reply to Mike Schmitt

    Thanks for the reply. I have used a!startProcess at the Button's saveInto like this:

    saveInto: {
       a!startProcess(
         processModel: cons!NGS_PM_TEST,
         processParameters: {},
         onSuccess: {}
       )
    }

    But still validation is not working.

  • 0
    Certified Lead Developer
    in reply to SurajitSen

    In this case you would not need to set "submit" to true (in fact you should probably set it to FALSE); keep the "validate" parameter set to true; and i still suggest you remove the "validation group" parameter altogether, as i mentioned before.

Reply Children