On Monday 26 October 2009 06:23:25 am Ed Leafe wrote: > try: > myBiz.validateUserInput(val) > except dException.BusinessRuleViolation, e: > dabo.ui.stop("Invalid entry: %s" % e) > > It's a much more Pythonic approach, and keeps the UI separate from > the bizobj layer logic
I have often wondered just how Form.validateField() actually worked and the thinking behind it. I think it only works at the save(). So could you explain how it's suppose to be done in code. Also many of us are looking for something like your "validateUserInput(val)" at the time of lostFocus (or a when()). For example I discovered that my client was entering a string ('250') into a dDateTextBox by accident and it was not being caught until it created a real problem (backend error). I at first added the field to the bizObj.validateRecord. But the client did not like the fact that the system did not immediately warn them after leaving the control. I then added a lostFocus routine. Is there a simple way to add validation at the UI level? Or tell me the thinking behind not having any validation (that I'm aware of) at the UI level. Thanks in advance Johnf _______________________________________________ Post Messages to: Dabo-users@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/200910260901.08156.jfabi...@yolo.com