#799: Number validator isn't called if input is empty
------------------------------------+---------------------------------------
 Reporter:  [EMAIL PROTECTED]  |        Owner:  anonymous
     Type:  defect                  |       Status:  closed   
 Priority:  normal                  |    Milestone:           
Component:  Widgets                 |      Version:  0.9a5    
 Severity:  normal                  |   Resolution:  invalid  
 Keywords:                          |  
------------------------------------+---------------------------------------
Changes (by michele):

  * status:  new => closed
  * resolution:  => invalid

Comment:

 Since FE 0.5.1 (that ships with 0.9a5) not_empty works as expected hence
 you need to set not_empty=True nothing more.

 {{{
 #!python
 >>> from turbogears import validators
 >>> test = validators.Number()
 >>> test.to_python('')
 >>> test.not_empty
 False
 >>> test.not_empty = True
 >>> test.to_python('')
 Traceback (most recent call last):
   File "<stdin>", line 1, in ?
   File
 
"/home/michele/Progetti/TurboGears/svn/1.0/thirdparty/formencode/formencode/api.py",
 line 305, in to_python
     raise Invalid(self.message('empty', state), value, state)
 formencode.api.Invalid: Please enter a value
 >>>
 }}}

-- 
Ticket URL: <http://trac.turbogears.org/turbogears/ticket/799>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Tickets" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears-tickets
-~----------~----~----~----~------~----~------~--~---

Reply via email to