MCPcopy
hub / github.com/react-component/form / render

Method render

examples/async-init.js:23–52  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

21 }
22
23 render() {
24 const { getFieldProps, getFieldError, isFieldValidating } = this.props.form;
25 const errors = getFieldError('email');
26 return (<div style={ regionStyle }>
27 <div>email validate onBlur</div>
28 <div>
29 <input {...getFieldProps('email', {
30 initialValue: '',
31 validateFirst: true,
32 rules: [
33 {
34 required: true,
35 },
36 {
37 type: 'email',
38 message: '错误的 email 格式',
39 },
40 this.checkSpecial,
41 ],
42 validateTrigger: 'onBlur',
43 })}
44 /></div>
45 <div style={errorStyle}>
46 {errors ? errors.join(',') : null}
47 </div>
48 <div style={errorStyle}>
49 {isFieldValidating('email') ? 'validating' : null}
50 </div>
51 </div>);
52 }
53}
54
55class Form extends Component {

Callers

nothing calls this directly

Calls 1

getFieldPropsFunction · 0.85

Tested by

no test coverage detected