Open droidmanspace opened 6 years ago
Guys!
I don't know much about git.! Worked on svn.
So I am just giving a suggestion.
Db level RegexValidator for Phone Number Validations can help.! Hereby giving the phone number validation. Model ` phone_regex = RegexValidator(regex=r'^\s(?:+?(\d{1,3}))?[-. (](\d{3})[-. )](\d{3})[-. ](\d{4})(?: x(\d+))?\s$', message="Phone number must be entered in the format: '+999999999'. Up to 15 digits allowed.")
phone_number = models.CharField(validators=[phone_regex], blank=True, max_length=20)`
I have started working on this issue- Server side validation for phone number
This is fixed in #581
Subject of the issue
Many people entering a place or other alphabet characters in the field of "Phone". Please add phone number validation to the input field.
Your environment
Steps to reproduce
Apply some condition checks. After only it must be stored in DB.
Expected behavior
Check for input whether it is number and length at least 10.
Actual behaviour
Accept every character as input
Links
https://keralarescue.in/request_details/25138/ https://keralarescue.in/request_details/24203/