How to Solve NameError: name 'RegexValidator' is not defined -- django

Solution: Import the 'RegexValidator' module

To Solve the error, add the following line to the top of your code.

from django.core.validators import RegexValidator

 

For more information:
Python django RegexValidator