Skip to main content
fantacyc0001
August 22, 2024
Question

When submit task, validation doesn't work

  • August 22, 2024
  • 6 replies
  • 0 views

Dear experts,

I have a PM with user input task, in task form, I define one submit button, which submit is true, validation is true, in this task form, it have a child interface, which have a paragraph field which required is true. However when I keep this paragraph field as empty and press the submit button, user input task completed, PM completed, no validation here. What maybe the possible reason here?

6 replies

stefanhelzle0001
August 22, 2024

Can you share some code showing this behaviour?

fantacyc0001
August 22, 2024

Button in the task form:

a!buttonWidget_23r3(
label: "submit",
value: "submit",
saveInto: {
ri!buttonAction
},
submit: true(),
style: "PRIMARY",
validate: true(),

)

Paragraph field in child interface:

a!paragraphField(
value: trim(local!rationale),
required: true(),
saveInto: {
  a!save(
  local!rationale,
   trim(save!value)
  ),
),
characterLimit: 1000,
showCharacterCount: true()
)

mikes0011
Brainy
August 22, 2024

Sounds like something is not configured correctly.  For the button, when you say "validation is true", can you clarify that you're referring to the "validate" parameter?  And can you confirm that the empty paragraph field is currently visible on the interface when the user clicks "submit" and the validation apparently fails?

fantacyc0001
August 22, 2024

yes, validate parameter is true, and I didn't give showWhen for paragraph field, it won't be hidden.

mikes0011
Brainy
August 22, 2024

Can you show a screenshot of what the form looks like when this behavior happens?  The code snippets look correct unless there's some unusual configuration involved that isn't being shown.  As long as the paragraph field is visible on the form when "submit" is clicked, and it's marked as required, and has an empty value (like true null or zero characters, as opposed to a single space or something), then the validation condition *should* be firing and preventing form submission.  But it's hard to tell whether something else unusual might be interrupting this normal configuration.

prasantap0900
August 26, 2024

I think you can test the interface once; you can see is it working or not.