ConcourseSuite Support

Support
Corporate
PUBLIC PROFILE

Object Validator

ConcourseSuite CRM provides various user-input forms which allow a user to add new content or edit existing data in the CRM. Based on the business rules that govern a particular object, the object should have certain required data associated with it at any point in time. As an example, any Ticket in the system should be associated with a specific Account and it's Contact.

Certain forms are designed to encapsulate a particular object and therefore provide form validation. On form submission, the object represented by the form is auto-populated and fed to the Object Validator, before it can be successfully stored in the database. As the name suggests, the Object Validator performs object validation and verifies if the object satisfies all the rules that it should adhere to, based on the business rules defined for that specific object.

If the object is successfully validated, then it is stored in the database, else the form is returned to the user for review and to re-submit.

com.concursive.crm.web.controller.utils.ObjectValidator;

When a new form that corresponds to a bean is introduced in ConcourseSuite CRM, the action to which the form is posted to, when a user submits it, should call the following method to validate the object.

ObjectValidator.validate(SystemStatus, Connection, Object)

Most of the errors or warnings thrown by a form that corresponds to a bean, are represented by the following constants defined in the object validator. Each constant denotes a particular error/warning and is used to determine the message to be displayed when the form is returned back to the user.

1. REQUIRED_FIELD
2. IS_BEFORE_TODAY
3. PUBLIC_ACCESS_REQUIRED
4. INVALID_DATE
5. INVALID_NUMBER
6. INVALID_EMAIL
7. INVALID_NOT_REQUIRED_DATE
8. INVALID_EMAIL_NOT_REQUIRED
9. INVALID_ENTRY

Sign in to add your comment.