You can change the line:
echo $this->fieldsClass->display($oneExtraField,$this->$type->$fieldName,'data',false,' '.$onWhat.'="hikashopToggleFields(this.value,\''.$fieldName.'\',\''.$type.'\',0);"'); ?>
to:
echo $this->fieldsClass->display($oneExtraField,$this->$type->$fieldName,'data',false,' '.$onWhat.'="if(this.id==\'address_codeclient\' && ((!isNaN(parseFloat(this.value)) && isFinite(this.value)) || this.value.length!=6)){ alert(\'this field must be a number of 6 characters\'); this.value='\'\; return false;} hikashopToggleFields(this.value,\''.$fieldName.'\',\''.$type.'\',0);"'); ?>
in the file custom_field of the view user via the menu Display->Views.