Make a field or all fields required in React
问题 I have an input field like this: <Form.Field name="contactName" className="" control={Input} label="Contact Name" placeholder="Contact Name" value={this.state.contactName || ''} onChange={this.onChange} /> and I want to make it required so for that it should be add required attribute and now looks like this: <Form.Field name="contactName" className="" control={Input} label="Contact Name" placeholder="Contact Name" value={this.state.contactName || ''} onChange={this.onChange} required /> I