def run ( self , value ) : if self . pass_ and not value . strip ( ) : return True if not value : return False return True
checking if field is empty python
Determines if value value is empty . Keyword arguments : value str -- the value of the associated field to compare
def run(self, value):
        """ Determines if value value is empty.
        Keyword arguments:
        value str -- the value of the associated field to compare
        """
        if self.pass_ and not value.strip():
            return True

        if not value:
            return False
        return True