I'm creating a website that has a function to let user share their Google Docs URL to each others. I want to validate the input of the user to be Google Docs URL before I let them post it so that it could be safe. I'm using Flask and Python and I wonder if there is anyway to validate this.
The only validations I learn so far are those from FlaskForm like below:
project_link = StringField('Google Docs link to your project', validators=[DataRequired()])
and to limits the URL's character to 100 in my models.py
I think a possible way to do it is to create some Python codes in my views.py that check if the URL contains phrases like "docs.google.com"...
I don't really know how to validate if an URL is a Google Docs URL and I would greatly appreciate it if you could show me how.
Thank you.