In some circumstances it would help a lot if the validation could be completely disabled in the field settings (like with soft validation?).

Especially for tests and other cases or when the server does not answer at all and a manual verification is used. What do you think about it? :)

CommentFileSizeAuthor
#4 2133169-4.patch3.43 KBvalthebald
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Anybody’s picture

Issue summary: View changes
roball’s picture

This module's main purpose is to validate an entered VAT ID number. If it would not do that, you could instead just use a plain Text field.

knalstaaf’s picture

We have case in which a user's VAT number doesn't validate in the EU database, but it does validate on national level for some reason. In other words: this person's company is totally legal, as its VAT number is officially registered in the national database, but it seems that it's not registered in the European one.

So in this case the option to temporary bypass the validation for one exceptional registration would be very valuable, as the soft validation wouldn't let it pass either.

Disabling the validation codewise can be done by commenting out the following (around line 144 of vat_number.module):

/*
elseif (_vat_number_validate_vat($value, $skip_validation_on_service_failure) === FALSE){
      $message .= t('The VAT number could not be validated by the European VAT Database. Please go back and input a correct VAT.');
}
*/

-> Don't forget to uncomment again once you're done.

valthebald’s picture

Status: Active » Needs review
FileSize
3.43 KB

Ability to skip web service validation is useful for debugging purposes, can be then turned on on production services. Attached patch introduces new checkbox in widget settings

maxplus’s picture

Hi,
thanks @valthebald for patch #4.

I'm going to change it a little bit to better fit my needs: I not only want a checkbox in the widget settings form but also a checkbox for the site admin when he is editing a commerce order. So I want a checkbox above the VAT number text field to disable validation (only visible for pre-defined roles)

dwkitchen’s picture

Status: Needs review » Needs work

I agree with @maxplus, this needs to have permissions around who can skip validation etc.