Skip to content

feat(rules): add vat rule#131

Merged
thetutlage merged 3 commits intovinejs:4.xfrom
julienbenac:feat/vat-rule
Nov 24, 2025
Merged

feat(rules): add vat rule#131
thetutlage merged 3 commits intovinejs:4.xfrom
julienbenac:feat/vat-rule

Conversation

@julienbenac
Copy link
Contributor

🔗 Linked issue

No linked issue or discussion.

❓ Type of change

  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

This PR introduces a new vat validation rule for string schemas in VineJS, based on the validator library. No external library is added, so the core package size remains small.

// French VAT number validation
vine.string().vat({ countryCode: ['FR'] })

// German VAT number validation
vine.string().vat({ countryCode: ['DE'] })

// French or German VAT number validation
vine.string().vat({ countryCode: ['FR', 'DE'] })

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@thetutlage
Copy link
Contributor

Looks good. Can you open another PR for the docs?

@thetutlage thetutlage merged commit 999b667 into vinejs:4.x Nov 24, 2025
6 checks passed
@julienbenac julienbenac deleted the feat/vat-rule branch November 24, 2025 16:13
@julienbenac
Copy link
Contributor Author

julienbenac commented Nov 24, 2025

Done vinejs/vinejs.dev#47 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments