You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NotEmptyValidator always returns an empty set for it's bad property regardless of failure causing the Vlad class to return False and log the general "Failed :(" message without an indication of the field that failed or the times it failed. Solution proposed below avoids repetition of empty strings in logger output while providing logging on par with the other Validators.
classNotEmptyValidator(Validator):
''' Validates that a field is not empty '''def__init__(self):
self.fail_count=0self.empty=set([])
defvalidate(self, field, row={}):
iffield=='':
self.empty.add(field)
raiseValidationException("Row has empty field in column")
@propertydefbad(self):
returnself.empty
The text was updated successfully, but these errors were encountered:
gregorkschroeder
changed the title
NotEmptyValidator has no field logging
NotEmptyValidator minimal logging
Sep 18, 2017
NotEmptyValidator always returns an empty set for it's bad property regardless of failure causing the Vlad class to return False and log the general "Failed :(" message without an indication of the field that failed or the times it failed. Solution proposed below avoids repetition of empty strings in logger output while providing logging on par with the other Validators.
The text was updated successfully, but these errors were encountered: