This is a simple Python GUI application that validates email addresses using regular expressions. It checks for basic email format validation and also validates email addresses for popular email services such as Gmail, Outlook (including Hotmail), and Yahoo.
- Make sure you have Python installed on your system.
- Install the required packages by running the following command:
pip install tk
- Run the script
email_validator_gui.py
. - Enter an email address in the provided input field and click the "Validate Email" button.
- The application will display a message box indicating whether the email address is valid or not.
The script uses regular expressions to perform email validation. The basic pattern for email validation is defined as follows:
^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$
This pattern checks for basic email format validation, ensuring that the email address contains a local part, "@" symbol, domain name, and top-level domain with at least two characters.
The script also includes regular expression patterns to check for specific email services such as Gmail, Outlook (including Hotmail), and Yahoo. If the email address matches any of these patterns, the application displays a more specific validation message.
Before performing email validation, the application checks if the input field is empty. If no email address is provided, a warning message will be displayed.
Please note that while this application performs basic email format validation, it does not guarantee the existence or deliverability of the email addresses.
Here are some examples of email addresses that can be tested using the Email Validator GUI:
john.doe
alice.smith@com
mike123@123
jane_doe@outlook
support@company
[email protected] (Valid Gmail address)
[email protected] (Valid Outlook/Hotmail address)
[email protected] (Valid Yahoo address)
Feel free to use and modify this code to enhance your Python programming skills! ^^