()
| 167 | } |
| 168 | |
| 169 | getError() { |
| 170 | if (this.hasError()) { |
| 171 | const error = |
| 172 | this.props.options.error || this.typeInfo.getValidationErrorMessage; |
| 173 | if (t.Function.is(error)) { |
| 174 | const validationOptions = this.getValidationOptions(); |
| 175 | return error( |
| 176 | this.getValue(), |
| 177 | validationOptions.path, |
| 178 | validationOptions.context |
| 179 | ); |
| 180 | } |
| 181 | return error; |
| 182 | } |
| 183 | } |
| 184 | |
| 185 | hasError() { |
| 186 | return this.props.options.hasError || this.state.hasError; |
no test coverage detected