NEW rewrote validation to use ORM instead of manual quering and escaping...

Part of the effort to cleanup AjaxUniqueTextField.