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
  • "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.

Reply
  • "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.

Children