aws-amplify / aws-amplify/amplify-data
Support required enum fields - `a.enum().required()`
Open
data-schema
feature-request
- Dominant language
- TypeScript
- Stars
- 18
- Forks
- 23
- Avg merge
- 26m
- Merged PRs (30d)
- 1
Description
**Is your feature request related to a problem? Please describe.**
It is currently not possible to mark an enum field as **required**.
**Describe the solution you'd like**
Support calling `.required()` as in `a.enum().required()` to mark the field as required.
**Describe alternatives you've considered**
Replacing any required `enum` with a required `string` and manually validating and restricting the values with a custom resolver. This would mean that I lose all benefit of enums. This would mean I would now have more code to manage just to implement an enum.
Contributor guide
Assessment
This issue has not been assessed yet.