Yes that's what I meant. Basically each FormEncode validator has a matching JavaScript validator (if possible or practical). Setting the validator in the widget will automatically add some JavaScript when the widget is rendered, or alternatively a single JavaScript function is created for the whole form.
The JSON validation thing would be neat if it could work. Any ideas on that ?

