How can I perform a text validation on a textbox in form written in lift?
For example I have this form code:
def render = ".name" #> SHtml.text(name, name = _) &
".destination" #> SHtml.text(destination, destination = _) &
".phone" #> SHtml.text(phone, phone = _) &
":submit" #> SHtml.onSubmitUnit(() =>
How can I add validation to those text boxes?
Thanks
You can make all validations in function that is passed to
onSubmitUnit. Simply Lift Forms chapter have a lot of nice examples of form processing.