--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to lif...@googlegroups.com.
To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
in the render method I have:
"name=qty" #> SHtml.onSubmit(s =>
asInt(s).foreach(stock.is.qty_initial.set(_))) &
so there I convert whatever the user entered into an Int, I just tried
and if I enter text, the result is just 0 in the database. Which is
what I wanted.
stock is an object that I create like this:
object stock extends RequestVar(InventoryStock.create)
But there is also a way to add validation on your model class, let me
see if I can find it ...
Something like this iirc
object price extends MappedDecimal( ...) {
override def validation = <your validation here> :: super.validation
}
Hope it helps
Diego
> --
> You received this message because you are subscribed to the Google Groups "Lift" group.
> To post to this group, send email to lif...@googlegroups.com.
> To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
>
>
--
Diego Medina
Web Developer
(305) 788-4954
di...@fmpwizard.com
http://www.fmpwizard.com
> For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.