You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@avro.apache.org by "Kriskras99 (via GitHub)" <gi...@apache.org> on 2026/02/28 11:19:30 UTC
[I] Why do the `*Validator` traits have the `regex` function? [avro-rs]
Kriskras99 opened a new issue, #492:
URL: https://github.com/apache/avro-rs/issues/492
`SchemaNameValidator`, `SchemaNamespaceValidator`, `EnumSymbolNameValidator` and `RecordFieldNameValidator` all include a `regex` function:
```rust
fn regex(&self) -> &'static Regex {
...
}
```
What's the usecase for this? The `validate` functions cover all usecases I can think of.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@avro.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Why do the `*Validator` traits have the `regex` function? [avro-rs]
Posted by "martin-g (via GitHub)" <gi...@apache.org>.
martin-g commented on issue #492:
URL: https://github.com/apache/avro-rs/issues/492#issuecomment-3982834341
> The default `validate()` impls use the regex() to do their job.
By _default_ I meant the implementations in the respective SpecificationXyzValidator
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@avro.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Why do the `*Validator` traits have the `regex` function? [avro-rs]
Posted by "martin-g (via GitHub)" <gi...@apache.org>.
martin-g commented on issue #492:
URL: https://github.com/apache/avro-rs/issues/492#issuecomment-3977158000
The default `validate()` impls use the regex() to do their job.
AFAIR the idea was to make the default regex available for any custom validate() impls in case they need it.
But since they are _custom_ then most probably they won't use it ...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@avro.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Why do the `*Validator` traits have the `regex` function? [avro-rs]
Posted by "Kriskras99 (via GitHub)" <gi...@apache.org>.
Kriskras99 commented on issue #492:
URL: https://github.com/apache/avro-rs/issues/492#issuecomment-3977345473
That would make sense, but there is no default implementation for `validate`.
I think it would be good to add a default implementation.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@avro.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Why do the `*Validator` traits have the `regex` function? [avro-rs]
Posted by "martin-g (via GitHub)" <gi...@apache.org>.
martin-g closed issue #492: Why do the `*Validator` traits have the `regex` function?
URL: https://github.com/apache/avro-rs/issues/492
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@avro.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org