Storing URLs is a quite common use-case for databases. Being able to easily validate them would be a good quality of life improvement.
Note: this function was mentioned in #1304, but not implemented.
Describe the solution
The solution would be to implement a url validator function, just like the existing validators.
Ideally, the Implementation would follow the whatwg url specification, maybe by relying on an existing crate like url.
Alternative methods
The current alternatives are to either validate using regex, which could lead to incorrect or inconsistent validation, or to use parse::url::domain(value) and check if the result is null, but this isn't optimal either.
SurrealDB version
surreal 1.0.0-beta.8+20220930.c246533 for linux on x86_64
Contact Details
No response
Is there an existing issue for this?
[X] I have searched the existing issues
Code of Conduct
[X] I agree to follow this project's Code of Conduct
Is your feature request related to a problem?
Storing URLs is a quite common use-case for databases. Being able to easily validate them would be a good quality of life improvement.
Note: this function was mentioned in #1304, but not implemented.
Describe the solution
The solution would be to implement a url validator function, just like the existing validators. Ideally, the Implementation would follow the whatwg url specification, maybe by relying on an existing crate like url.
Alternative methods
The current alternatives are to either validate using regex, which could lead to incorrect or inconsistent validation, or to use
parse::url::domain(value)
and check if the result isnull
, but this isn't optimal either.SurrealDB version
surreal 1.0.0-beta.8+20220930.c246533 for linux on x86_64
Contact Details
No response
Is there an existing issue for this?
Code of Conduct