/** * Handles import field sanitizing for an field type * * @param $value string value to be sanitized * @param $vardefs array * @param $focus SugarBean object * @param $settings ImportFieldSanitize object * @return string sanitized value or boolean false if there's a problem with the value */ public function importSanitize($value, $vardef, $focus, ImportFieldSanitize $settings) { if (isset($vardef['len'])) { // check for field length $value = sugar_substr($value, $vardef['len']); } return $value; }
/** * Validate name fields * * @param $value string * @param $vardef array * @return string sanitized and validated value on success, bool false on failure */ public function name($value, $vardef) { if (isset($vardef['len'])) { // check for field length $value = sugar_substr($value, $vardef['len']); } return $value; }