duduamar
duduamar

Reputation: 3924

textbox validation in lift

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

Upvotes: 0

Views: 566

Answers (1)

4e6
4e6

Reputation: 10776

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.

Upvotes: 1

Related Questions