Error text for Components other than TextField and SelectField

Viewed 4259

i am implementing a simple form with fields to collect data. i need to implement validation on a few fields like textfield, checkbox and radio buttons.

As per documentation the prop to use is 'errorText'

As per the spec at the site(http://www.material-ui.com/v0.11.1/#/components/switches) there's no property supporting it.

But we do have this for textboxes.(http://www.material-ui.com/v0.11.1/#/components/text-fields)

<TextField hintText="Hint Text"  errorText={this.state.errorText}  onChange={this._handleErrorInputChange} />

So anyone with prior experience in this can help out as to how they have implemented this or am i just missing something basic?

1 Answers
Related