MCPcopy Index your code
hub / github.com/Lobos/react-ui / handleValidate

Method handleValidate

src/FormControl.js:90–103  ·  view source on GitHub ↗
(id, result)

Source from the content-addressed store, hash-verified

88 }
89
90 handleValidate (id, result) {
91 this.items[id].$validation = result;
92
93 let validations = [];
94 forEach(this.items, (item) => {
95 if (item.$validation instanceof Error) {
96 validations.push(item.$validation.message);
97 }
98 });
99 validations = validations.join(', ');
100 if (validations !== this.state.validations) {
101 this.setState({ validations });
102 }
103 }
104
105 getHint (props) {
106 if (props.required) {

Callers 1

itemChangeMethod · 0.95

Calls 1

forEachFunction · 0.90

Tested by

no test coverage detected