Speed up development with full-stack environments for every branch.

Learn More

Form validation in Flask [Python]

Forked from Basic Flask Example.

1348 Runs 9287 Views 2887 Copies


lgp171188 18

published 4 years ago


Form validation in Flask

This project demonstrates form validation using Flask web framework. On loading the page with URL / a form is displayed to the user. The form contains the fields for 'Name', 'Email', 'Gender', 'Username', 'password'. When the user enters the data and submits the data via POST method, it is submitted to the same URL and the server-side code handling the POST request for the URL, extracts the form data from the request and validates each field for valid data and raises appropriate error messages if the data is invalid. If the data entered is valid, the view renders a success template that displays the data entered by the user. Regular expression is used to validate the email address entered.

Please login/signup to get access to the terminal.

Your session has timed out.

Dismiss (the page may not function properly).