remix-forms
remix-forms copied to clipboard
Allow `SmartInput` to receive `required` prop
Right now, if we want to render the HTML's required
attribute in a project-wide way, we have to introspect the Zod schema inside renderField
because SmartInput
doesn't receive the required
prop. Ideally, we should allow SmartInput
to receive all attributes that are shared between selects, text areas, inputs, checkboxes, etc. But because it is not that simple to achieve that in a generic way, we'd be already happy with just solving the use case for required
for now.
Check #80 for history on this.