/** * Validates either a single field or the whole command against * the validation rules that are enforceable on the PHP side - * type rules, ranges, four-digit dates, etc. Rules such as unique * or existing, or validation by calculation field, cannot be * pre-validated. * * If the optional $fieldName argument is passed, only that field * will be validated. Otherwise the command will be validated just * as if execute() were called with prevalidation turned on in the * API properties. validate() returns TRUE if validation passes, * or a FileMaker_Error_Validation object containing details about * what failed to validate. * * @param string $fieldName Only validate this field. If empty, validate the whole record. * @return boolean|FileMaker_Error_Validation Result of field validation on $value. */ function validate($fieldName = null) { return $this->_impl->validate($fieldName); }