PDA

View Full Version : Model Validation



ksystems
21 Jun 2010, 12:06 PM
With the introduction of a "Model" class (to replace record) I was wondering a few things.


Is it possible to bind a form to a model - i.e. have it update the model as the form changes?
Why is validation NOT performed on the model (all apart from type and allowBlank)? It seems weird to extract validation (based on implementations on most other client and server frameworks) from the model and tightly couple the UI components to the model?


I hope these don't come across as criticisms :-P.

TommyMaintz
21 Jun 2010, 1:35 PM
They definitely don't come across as criticisms as they are valid arguments. Even better yet, both of the things you mentioned will be implemented exactly the way you suggested. It's just that we havent gotten around to doing it, and we want to make sure we do it right.

ksystems
21 Jun 2010, 10:24 PM
They definitely don't come across as criticisms as they are valid arguments. Even better yet, both of the things you mentioned will be implemented exactly the way you suggested. It's just that we havent gotten around to doing it, and we want to make sure we do it right.

Good to hear. Thanks for the response.

James

meyerovb
15 Jul 2010, 7:41 AM
When I go to the api and search for allowblank it pulls up properties for all the form fields, but when I click on them the property doesn't actually show on the component's documentation page. Is there an example that demonstrates form validation in sencha?