Commit 24a68e71 authored by wangxuelai's avatar wangxuelai

''

parent 0c99c37b
......@@ -202,12 +202,12 @@ class AddCourseModalForm extends React.Component {
rules: [
{
required: true,
message: '请输入正整数',
pattern: new RegExp(/^[1-9]\d*$/, 'g'),
message: '请输入4-8位数字密码',
pattern: new RegExp(/^\d{4,8}$/, 'g'),
},
],
})(
<Input placeholder="请输入4-8位密码" min={0} />,
<Input placeholder="请输入4-8位数字密码" min={0} />,
)}
</FormItem> : ''
}
......
......@@ -41,7 +41,7 @@ class AddCourseModalForm extends React.Component {
handleClick = (key) => {
const { dispatch, form } = this.props;
this.props.form.validateFields((err, values) => {
if ((values.title != '') && (values.time != '')) {
if ((values.title != '') && (values.time)) {
this.setState({
isActive: key,
});
......@@ -193,14 +193,13 @@ class AddCourseModalForm extends React.Component {
rules: [
{
required: true,
message: '请输入正整数',
pattern: new RegExp(/^[1-9]\d*$/, 'g'),
message: '请输入4-8位数字密码',
pattern: new RegExp(/^\d{4,8}$/, 'g'),
},
],
})(
<Input style={{ width: 200 }} maxLength={8} placeholder="请输入4-8位密码" />,
<Input style={{ width: 200 }} maxLength={8} placeholder="请输入4-8位数字密码" />,
)}
<span className="ant-form-text">&nbsp;&nbsp;请输入4-8位数字密码</span>
</FormItem> : ''
}
{/* <FormItem className={pageStyle.firstItem} {...formItemModalLineLayout}> */}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment