Ensure that all ValidationAttributes are native AoT compatible
Open
area-minimal
feature-validation
NativeAOT
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 290
Description
Not all `ValidationAttributes` exposed by System.ComponentModel are native AoT compatible. Some use unbounded reflection to determine types and availalbe APIs on them.
We should make an effort to ensure that all non-native Aot compatible ValidationAttributes are consumed safely in the validation implementation.
- `RangeAttribute`: Can be achieved by introducing a new generic overload of the attribute that also supports being able to set `MinValue` and `MaxValue` independently
- `MaxLengthAttribute`: Uses reflection to get `Count` property. Might require source generation.
- Others?
Contributor guide
Assessment
This issue has not been assessed yet.