if (EmailValidator.isNotValid(email)) {
errors.put("email", "Địa chỉ thư không hợp lệ");
}
try {
Connection conn = getConnection();
UserDAO userDAO = new UserDAO(conn);
if (userDAO.findByEmail(email) != null) {
errors.put("email", "Địa chỉ thư đã được sử dụng");
}
conn.close();
} catch (SQLException e) {
throw new ServletException(e);