Hello,
I am trying to do a simple check on a paragraphField or any field(integer, text, decimal field).
The validation is not working for empty or null. I tried giving a!isNullOrEmpty(ri!value), Null(ri!value), ri!value=null. The validation message is not shown.
If i give any other logic, it works.
Discussion posts and replies are publicly visible
A field based validation is only evaluated when the value is not null. Set "required" to true to catch this.
Hi Stefan,
i dont want the asterix.
Why? It is a good UI design style to indicate to the user that a field is required.
But, feel free to add a form based validation, or wrap the text field into a section layout and add your validation to it.
If i use section layout validation, the validation is seen at load itself. i want it to get validated on click of button. What is a form based validation?
The form layout also supports validations.
Its same like getting the validation on load before user can input anything. I was hoping we could not show the asterix.
Have to use it i suppose.
Using a!validationMessage function will help to achieve this.
a!formLayout( label: "New Application", contents: { a!paragraphField( label: "Paragraph", labelPosition: "ABOVE", value: ri!text, saveInto: { ri!text }, refreshAfter: "UNFOCUS", height: "MEDIUM", validations: {} ) }, validations: a!validationMessage( message: "Invalid", showWhen: a!isNullOrEmpty(ri!text), validateAfter: "SUBMIT" ), buttons: a!buttonLayout( primaryButtons: { a!buttonWidget( label: "Submit", submit: true(), style: "PRIMARY" ) } ) )
Perfect. Thanks you Jones .
Hello, Is there a setting to display a confirmation message after performing the required checks? I believe that currently a confirmation dialog is displayed first, and after pressing Yes, the required checks are performed.
Thanks.
Yes Currently After Confirmation it Validates fields AFAIK there is no setting to change it's behaviour , But we can achieve your requirement in couple of ways , i would suggest adding a new button just for performing required checks.
hiron0583 You can add all the validation conditions in a variable too to check if any validations are getting invoked currently on the screen. Let's say we named that variable as activeValidations.
Now if the value of activeValidations is true, then don't show the confirmation else you can.
Hope that helps!
Harshit Bumb (Appyzie)
Thank you for your suggestion. I will verify your suggestions and propose them to my clients.