when a user inputs the date in date field other than within last 12 months then validation error should popup.. Thanks for your time and help..
Discussion posts and replies are publicly visible
Validations in general:
https://docs.appian.com/suite/help/22.2/recipe-add-multiple-validation-rules-to-one-component.html
Check for number of days:
tointeger(today() - date(2021,1,1)) > 365
Hi Prasad,
Try this:
a!localVariables( local!date, a!formLayout( label: "Example: Date Field Validation Rule", contents:{ a!dateField( label: "Select a valid date", instructions: "Enter a date within last 12 months", value: local!date, saveInto: local!date, validations: { if( not( and( today() - 365 <= todate(local!date), local!date <= today() ) ), "Date selected is not within last 12 months", "" ) } ) }, buttons: a!buttonLayout( primaryButtons: a!buttonWidget( label: "Submit", submit: true ) ) ) )
thank you that helped ogomes