I have the same problem like
"This validation is working fine when I am testing the interface. But when the interface is integrated to the process, validation doesn't trigger and form gets submitted without executing the validation.Is there anything else that I should configure to make sure that validation gets executed before the submission of form?" https://community.appian.com/discussions/f/user-interface/8783/form-level-validation-is-not-triggering-on-submit
load( local!isCustomer: true, local!customerDetails, local!showSearchResults, local!selectedCustomer, local!errorMessage, with( a!formLayout( label: "Test", validationGroup: "main", validations: if( rule!IsNotNullOrEmpty( local!errorMessage ), local!errorMessage, null ), contents: { a!radioButtonField( choiceLayout: "COMPACT", choiceLabels: { "Customer", "Non-Customer" }, choiceValues: { true, false }, value: local!isCustomer, saveInto: { local!isCustomer, a!save( ri!bpCustomer, null ) } ), if( local!isCustomer, { a!sectionLayout( contents: rule!BAE_SectionSearchCustomer( showSearchResults: local!showSearchResults, selectedCustomer: local!selectedCustomer ) ), a!buttonLayout( primaryButtons: { a!buttonWidgetSubmit( label: "Next", value: true, skipValidation: false, saveInto: { a!save( local!customerDetails, rule!GetCustomerById( local!selectedCustomer.CustomerID ) ), if( rule!IsNotNullOrEmpty( local!customerDetails ), { a!save( ri!bpCustomer, ............ ) ), a!save( local!errorMessage, null ) }, a!save( local!errorMessage, "Something went wrong, unable to retrieve additional customer data, please try again" ) ), a!save( ri!auditHistory, append( ri!auditHistory, 'type!{urn:com:appian:types:BP}BP_AuditHistory'( user: loggedInUser(), step: "Select Customer", action: "NEXT", comment: "Existing Customer", timestamp: now() ) ) ) }, validationGroup: "main", disabled: rule!IsNullOrEmpty( local!selectedCustomer ) ) }, secondaryButtons: { a!buttonWidgetSubmit( label: "Cancel", skipValidation: true, value: true, saveInto: { } ) } ) }, { a!sectionLayout( label: "", contents: { a!textField( value: "Then let's continue", readonly: true ), a!buttonLayout( a!buttonWidgetSubmit( label: "Next", value: true, skipValidation: true, saveInto: { } ) ) } ) } ) } ) ) )
I have a form which has a form level validation which is configured to execute on Submit, using validationGroup . Attached the code. Maybe, somebody will find a mistake.
Discussion posts and replies are publicly visible