I have a form where I must enter the time of entry and exit (from 8 pm to 3:00 pm) and validations.
I want to validate a text field called "start time" where when entering.
What is done?
thanks
Discussion posts and replies are publicly visible
Hi Alastr,
Question is not clear ,can you please elaborate it
my understanding you have two text fields where you can give start and end time
you need to validate those given values is time or not?
I want to enter two hours in two text fields. and validate the end time as: it must always be after the start time a!textField( label: "start time", labelPosition: "ABOVE", saveInto: {}, refreshAfter: "UNFOCUS", validations: {} ), a!textField( label: "end time", labelPosition: "ABOVE", saveInto: {}, refreshAfter: "UNFOCUS", validations: {} ),
Create a rule with two inputs as text 1)startTime 2)endTime
load( local!startTime: "9:00 AM", local!endTime: "8:30 AM", if( totime( local!endTime ) > totime( local!startTime ), "Valid", "Not Valid" ))
and then how do I call that rule to use it in an interface?
a!textField( label: "end time", labelPosition: "ABOVE", saveInto: {}, refreshAfter: "UNFOCUS", validations: rule!yourRule( startTime:ri!startTime, endTime:ri!endTime ))
Thanks!!!