public function define_validate_specific($data, $files) {
        $errors = array();

        // Make sure the start year is not greater than the end year.
        if ($data->param1 > $data->param2) {
            $errors['param1'] = get_string('startyearafterend', 'profilefield_datetime');
        }

        return $errors;
    }
public function define_validate_specific($data, $files) {
        $errors = array();

        // Make sure the start year is not greater than the end year.
        if ($data->param1 > $data->param2) {
            $errors['param1'] = get_string('startyearafterend', 'profilefield_datetime');
        }

        return $errors;
    }
public function define_validate_specific ( $ data , $ files ) { $ errors = array ( ) ; // Make sure the start year is not greater than the end year. if ( $ data -> param1 > $ data -> param2 ) { $ errors [ 'param1' ] = get_string ( 'startyearafterend' , 'profilefield_datetime' ) ; } return $ errors ; }
Validate the data from the profile field form.

@param stdClass $data from the add/edit profile field form
@param array $files
@return array associative array of error messages
Validate the data from the profile field form .