开发者

textbox validation in lift

How ca开发者_运维百科n 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜