antd中form自定义rules
1.使用getFieldDecorator
<FormItem label="手机号" > {getFieldDecorator('phone', { initialValue: contactDetail.phone, rules: [ { required: true, message: '请输入手机号' }, { pattern: /^1\d{10}( 1\d{10})*$/, message: '手机号格式不正确', }, ], })(<Input placeholder="多个手机号请用空格分隔" />)} </FormItem>
name可以拼接起来
posted on 2019-02-21 15:46 Diamond_xx 阅读(3758) 评论(0) 编辑 收藏 举报