You are here

function hostingService_example_basic::validate in Hostmaster (Aegir) 6

Validate a form submission.

Overrides hostingService::validate

File

modules/hosting/example/hosting_example.service.inc, line 137
Example service implementation for the hosting front end.

Class

hostingService_example_basic
An implementation of the example service type, registered with hook_hosting_service.

Code

function validate(&$node, &$form) {

  // REMEMBER TO CALL THE PARENT!
  parent::validate($node, $form);
  if (sizeof($this->example_field) > 30) {
    form_set_error('example_field', t("The example string must not be longer than 30 characters"));
  }
}