MCPcopy Index your code
hub / github.com/webpy/webpy / Validator

Class Validator

web/form.py:658–669  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

656
657
658class Validator:
659 def __deepcopy__(self, memo):
660 return copy.copy(self)
661
662 def __init__(self, msg, test, jstest=None):
663 utils.autoassign(self, locals())
664
665 def valid(self, value):
666 try:
667 return self.test(value)
668 except:
669 return False
670
671
672notnull = Validator("Required", bool)

Callers 2

test_form_validatorsFunction · 0.90
form.pyFile · 0.85

Calls

no outgoing calls

Tested by 1

test_form_validatorsFunction · 0.72