Example 9
Redesigned Annotation-based Validation
|
No Conversion
|
Pair Conversion
|
Auto Conversion
|
Default Conversion
|
Manual Parameter Conversion
|
Parameters converted to a non-string field of the same name using default converter
Required + IntegerRange
Score:
Submit
MaxLength + Boolean
Name:
Flag:
Submit
Date + Custom Post Validator
Date of Birth:
Submit
Required + MaxLength + Integer
Name:
Rating:
Unrated
⭐
⭐⭐
⭐⭐⭐
⭐⭐⭐⭐
⭐⭐⭐⭐⭐
Submit
Enum + Manual Validation
Tech Company:
Alibaba
Alphabet
Amazon
Apple
Microsoft
Meta
Oracle
Tencent
Tesla
TSMC
Attitude:
Love
Indifferent
Hate
Submit