Closed hasanMercell closed 6 months ago
Hi,
The examples you provided are missing 1 digit. Here is the official documentation for it: https://www.ytj.fi/en/index/vatnumber.html
I've tried many different formats also as the example provided in the link
<cac:PartyLegalEntity>
<cbc:CompanyID schemeID="002">FI12345678</cbc:CompanyID>
</cac:PartyLegalEntity>
but yet I'm still getting the error
"ublExtensions.ublExtension.extensionContent.eformsExtension.organizations.organization.company.partyLegalEntity.companyID": [
"Company Id is not a valid National Identifier or Private Road Identifier"
],
Length isn't the only thing that is being checked. Use a valid ID. You can use for eg. https://telepartikkeli.azurewebsites.net/tunnusgeneraattori to generate ID's in y-tunnus format. After that you need to add 'FI' to the start and remove the dash.
I have done that, please take a look at the attachments explaining it
Here's the generated Y-tunnus
And here is the Y-tunnus added with FI and dashes removed
<cac:PartyLegalEntity>
<cbc:CompanyID schemeID="002">FI56822759</cbc:CompanyID>
</cac:PartyLegalEntity>
And this is the result of the API response
"ublExtensions.ublExtension.extensionContent.eformsExtension.organizations.organization.company.partyLegalEntity.companyID": [
"Company Id is not a valid National Identifier or Private Road Identifier"
],
Ok, now it seems to be an issue in Hilma. Fixing..
Fix is now deployed in DEV environment and coming soon (~20 min) to TEST environment. I have updated the documentation: https://github.com/Hankintailmoitukset/hilma-api/blob/master/validation/ENoticeValidator.cs https://github.com/Hankintailmoitukset/hilma-api/blob/master/validation/FieldValidator.cs
Just did a test and it seems to work now, thanks a lot for the quick fix! @arinurkkala
Any idea when this fix will be deployed to PROD environment?
In about 30 minutes
Describe the bug Under the custom validation rules
nationalidentifierorvatnumber is set to true even though vat numbers aren't passing validation.
To Reproduce Validate any XML through the Validates the notice with national validation rules and TED schematron rules API and pass a VAT number under CompanyID such as
I've tried using FI0765432, FI0765432, FI-FI0765432 and none of them validates.
Expected behavior VAT number should be validated
API response
Additional context Under FieldValidator.cs in validation folder I don't see any function that validates VAT number, could it perhaps be missing?