Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: video url validation #346

Closed

Conversation

ariskemper
Copy link
Contributor

No description provided.

@fabian-hiller
Copy link
Owner

I can see the value of this validation function, but also see the problem that it is impossible to support all video URLs. Maybe it's too specific and we should recommend to custom implement such validations individually (e.g. using startsWith). I prefer that Valibot only covers clear and common cases.

@ariskemper
Copy link
Contributor Author

ariskemper commented Jan 4, 2024

I keept it intentionaly in a draft PR for opened discussion. We could support youtube, vimeo, twitch and we could make it that it is possible to pass Record with custom mappings service => video url regex, because the list could be really large. Maybe something similar could be implemented for creditCard, so extra creditCard regex could be added to existing creditCard providers. Then with services array you could choose only the ones you need?

@fabian-hiller
Copy link
Owner

Yes, that could work. But on the other hand, I don't want to overcomplicate our API. In special cases it is better to use custom, regex or write a custom validation action.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants