Re: [Cppcms-users] Setting field value after form.load() still fails validation
Brought to you by:
artyom-beilis
From: <ele...@ex...> - 2012-06-15 08:31:16
|
It's not a default value. The widget can either write an Int or YYYY-MM-DD in the widget. my overloaded form.load() uses regex to see if its an Int or Date. If it's a date, it converts it to an Int based on some rules. The intention was to convert Date into Int before validation runs. The field will then be validated as if it's an Int. I simply had to set num.valid(true) after the conversion to Int. My main point is that widgets::numeric::load silently validates the form, when validation should be done when validate() is called. Petr |