-
Notifications
You must be signed in to change notification settings - Fork 16
Validation
There is one configuration file containing validation rules. For Sources the filename is "conf/editor_configuration/default/configurations/SourcesValidation". The yml file has two sections:
- server with rules containing server side validation rules
- client with rules for client validation
Validation methods are defined in the MarcValidator class and called by the configuration.
Validation is done during MarcControllerActions.
In the editor there is a "Validate" action to check the validity of the record. This calls a ajax action "marc_editor.js#_marc_editor_validate" which post to the "MarcControllerAction#marc_editor_validate". The returning error message is displayed in a div#marc_errors container.
A validity check is also done before saving with MarcControllerAction#marc_editor_save. In case of server side error messages the page is redirected to back with the according message.
- marc_controller_action: marc_edit_validate
- marc_editor.js: marc_validate
- link to marc_action on edit page
- div container for marc_validator.errors
- show success of marc validator (green box)
- validator for user ability to create record for his workgroup
- cleanup of code