[Seaside] How to do validation such as for money (with a currency
class) in WAEditDialog subclasses?
Yar Hwee Boon
hboon at motionobj.com
Fri Oct 29 15:44:52 CEST 2004
I have a WAEditDialog subclass with a field called amount, which I am
using a currency class (which understands #amount: and #amount) to
represent. What I do is to implement a field renderer like:
textInputWithValue: model amount
callback: [:v | model amount amount: v].
However, how do I validate input which is non-digit? The #amount:
implementation assumes a number, and will throw some error. Similar for
WAHtmlRenderer>>dateInputWithValue:callback:. BTW, does no one use
#dateInputOn:of:? Seems odd that its missing... Thanks.
More information about the Seaside