vinejs / vine

VineJS is a form data validation library for Node.js
https://vinejs.dev
MIT License
1.1k stars 21 forks source link

Add support for ULID validation #58

Closed simoneNEMO closed 4 months ago

simoneNEMO commented 5 months ago

❓ Type of change

📚 Description

ULID is a widely used format for identifiers with some advantages over the canonically recognised UUID formats (1-5). ULIDs are natively supported in multiple frameworks, e.g. Laravel.

This pull request introduces support for ULID validation in VineJS by means of simple regex matching.

ULID specs: https://github.com/ulid/spec

📝 Checklist

Haven't been able to open a simple issue, only the "bug template" seems to work. If you consider to include this change I can update the docs accordingly.

thetutlage commented 4 months ago

Hey, can we please have some tests for the isUlid helper?

simoneNEMO commented 4 months ago

Hey, can we please have some tests for the isUlid helper?

Added some integration tests, tests for the isUlid helper and rebased

RomainLanz commented 4 months ago

Looks great! Thanks for the PR!

Do you mind creating another PR in the documentation repository?

simoneNEMO commented 4 months ago

Do you mind creating another PR in the documentation repository?

Thanks for merging, will do during the day!

simoneNEMO commented 4 months ago

@RomainLanz Added PR to docs here: https://github.com/vinejs/vinejs.dev/pull/22