Method
validate
(value = this.state.value, props = this.props)
Source from the content-addressed store, hash-verified
| 104 | } |
| 105 | |
| 106 | validate (value = this.state.value, props = this.props) { |
| 107 | let { onValidate, ...other } = props; |
| 108 | let result = Validation.validate(value, this.valueType, other); |
| 109 | this.setState({ hasError: result !== true }); |
| 110 | if (onValidate) { |
| 111 | onValidate(this.id, result); |
| 112 | } |
| 113 | return result; |
| 114 | } |
| 115 | |
| 116 | getValue () { |
| 117 | return this.state.value; |
Tested by
no test coverage detected