- if (req.getParameter("date") == null || req.getParameter("date").equals("")) {
- outputError(out, req, "You must enter the date when you met the assuree.");
- } else {
- try {
- Date d = sdf.parse(req.getParameter("date"));
- if (d.getTime() > System.currentTimeMillis()) {
- outputError(out, req, "You must not enter a date in the future.");
- }
- } catch (ParseException e) {
- outputError(out, req, "You must enter the date in this format: YYYY-MM-DD.");
- }
- }
- // check location, min 3 characters
- if (req.getParameter("location") == null || req.getParameter("location").equals("")) {
- outputError(out, req, "You failed to enter a location of your meeting.");
- } else if (req.getParameter("location").length() <= 2) {
- outputError(out, req, "You must enter a location with at least 3 characters eg town and country.");
- }
- // TODO checkPoints