示例#1
0
 def validate_phone(self, value):
     if not validate_mobile_number(value) and value:
         raise serializers.ValidationError("Not a valid mobile number")
     return value
示例#2
0
import unittest