Skip to main content
sharmilan9331
November 8, 2021
Question

Validation Group is not working properly

  • November 8, 2021
  • 10 replies
  • 0 views

I have added validation group in a datefield and added the same on a button. But the validation is triggered instantly on change of dates. My requirement is to validate the date field which is added in a grid layout on click of a button. 

    10 replies

    rayudua0001
    November 8, 2021

    Try removing the validationGroup in the a!dateField() and keep only on button or  buttonWidget- . My CE site is down so could not try validate but this change could work 

    mikes0011
    Brainy
    November 8, 2021

    Personally I've always found ValidationGroup functionality to be unintuitive and cumbersome to implement, use, and/or test, with results that are inconsistent with expectations or designed intentions.  Thus I typically use other methods to enforce validations under certain circumstances, beginning with making sure my forms are scope-limited where possible, and also, abstracting certain form functionality using local variables (such as variables keeping track of validation status of certain elements if needed).  Without knowing a bit more detail about your particular requirement or intended design, it's hard to offer much more of a concrete suggestion than this.

    The Expression Guru
    richardm900458
    November 8, 2021

    I am compleetly with Mike Schmitt there.
    The benefit of the validationGroup functionality depends strongly on your use case. 

    "Validations" are evaluated instantly. valdiationGroup is more focusing on "validate true" parameter of an buttonWidget.
    This means mostly a focus on required fields.

    Check out the following approaches:


    ValidationMessages:
    -> Validation Message - Appian 21.3


    R
    equired Messages:
    Configure Buttons with Conditional Requiredness - Appian 21.3