File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
src/vies-dotnet-api/Validators Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ limitations under the License.
19
19
namespace Padi . Vies . Validators ;
20
20
21
21
/// <summary>
22
- ///
22
+ ///
23
23
/// </summary>
24
24
[ SuppressMessage ( "Microsoft.Performance" , "CA1812:AvoidUninstantiatedInternalClasses" ) ]
25
25
public sealed class BeVatValidator : VatValidatorAbstract
@@ -34,14 +34,14 @@ public BeVatValidator()
34
34
this . Regex = _regex ;
35
35
CountryCode = COUNTRY_CODE ;
36
36
}
37
-
37
+
38
38
protected override VatValidationResult OnValidate ( string vat )
39
39
{
40
- if ( vat . Length == 10 && vat [ 0 ] != '0' )
40
+ if ( vat . Length == 10 && vat [ 0 ] != '0' && vat [ 0 ] != '1' )
41
41
{
42
- return VatValidationResult . Failed ( "First character of 10 digit numbers should be 0." ) ;
42
+ return VatValidationResult . Failed ( "First character of 10 digit numbers should be 0 or 1 ." ) ;
43
43
}
44
-
44
+
45
45
if ( vat . Length == 9 )
46
46
{
47
47
vat = vat . PadLeft ( 10 , '0' ) ;
@@ -54,4 +54,4 @@ protected override VatValidationResult OnValidate(string vat)
54
54
? VatValidationResult . Failed ( "Invalid BE vat: checkValue." )
55
55
: VatValidationResult . Success ( ) ;
56
56
}
57
- }
57
+ }
You can’t perform that action at this time.
0 commit comments