Validation integration , the second most cumbersome thing when coding
websystems,webapps. Interface coding being the hardest.
I took a look at the upcoming Widgets framework, while it looked good
you have to put the validators on the widgets? imo this is not the
right place! , it goes compeltly against DRY, you are repeating a lot
of stuff there is already in the model. not_null, unique, IntCol, etc.
Why not link the validators to the model ?
class Person(SQLObject):
name = StringCol(notNone=True, validators=[my_validator])
phone = IntCol(notNone=True, unique=True,
validators=[my_Validator2, my_validator3])
the something like:
person.parse()
which will return a parsed object that form widgets can understand and
redisplay in case of errors, that way there is no need to repeat things
10 times, thats what makes changing,extending the app so dificult and
cumbersome.