custom validator for charfield do not raise any error

前端 未结 0 748
我在风中等你
我在风中等你 2021-01-01 19:25

I have done a validator that is supposed to check the input from a charfield:

def postnvali(value):
    
    if not value.isalnum():
        raise ValidationE         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题