I created a table with the following statements in MySQL.
CREATE TABLE Users (
UserName VARCHAR(15) NOT NULL PRIMARY KEY,
Password VARCHAR(15) NOT NULL,
Active Bool DEFAULT TRUE
)
So I want make a 2 trigger on this table:
- Check the UserName and Password to be more than 4 or 8 characters. (Check the minimum length of string in inserting new rows)
- Make some regular expression to check the password. For example I want it contains both Upper case and lower case characters and numbers.
Please guide me. Thanks a lot.