remix-forms icon indicating copy to clipboard operation
remix-forms copied to clipboard

Allow `SmartInput` to receive `required` prop

Open danielweinmann opened this issue 2 years ago • 0 comments

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.

danielweinmann avatar Sep 10 '22 13:09 danielweinmann