mirror of
https://github.com/YMFE/yapi.git
synced 2025-01-06 12:45:22 +08:00
feat: 创建或求该项目表单的校验
This commit is contained in:
parent
f4f3479b56
commit
c6a866975c
@ -248,7 +248,9 @@ class ProjectList extends Component {
|
||||
>
|
||||
{getFieldDecorator('prd_host', {
|
||||
rules: [{
|
||||
required: true, message: '请输入项目线上域名!'
|
||||
required: true,
|
||||
message: '请输入项目线上域名,不允许出现‘\/’!',
|
||||
pattern: /.+\w$/
|
||||
}]
|
||||
})(
|
||||
<Input addonBefore={(
|
||||
@ -265,7 +267,8 @@ class ProjectList extends Component {
|
||||
>
|
||||
{getFieldDecorator('basepath', {
|
||||
rules: [{
|
||||
required: true, message: '请输入项目基本路径!'
|
||||
required: true, message: '基本路径应以\'\/\'开头,以\'\/\'结尾! ',
|
||||
pattern: /^\/.+\/$/
|
||||
}]
|
||||
})(
|
||||
<Input />
|
||||
|
@ -251,7 +251,8 @@ class UpDateModal extends Component {
|
||||
{getFieldDecorator('prd_host', {
|
||||
initialValue: initFormValues.prd_host,
|
||||
rules: [{
|
||||
required: true, message: '请输入项目线上域名!'
|
||||
required: true, message: '格式错误!',
|
||||
pattern: /.+\w$/
|
||||
}]
|
||||
})(
|
||||
<Input addonBefore={(
|
||||
@ -269,7 +270,8 @@ class UpDateModal extends Component {
|
||||
{getFieldDecorator('basepath', {
|
||||
initialValue: initFormValues.basepath,
|
||||
rules: [{
|
||||
required: true, message: '请输入项目基本路径!'
|
||||
required: true, message: '基本路径应以\'\/\'开头,以\'\/\'结尾! ',
|
||||
pattern: /^\/.+\/$/
|
||||
}]
|
||||
})(
|
||||
<Input />
|
||||
|
Loading…
Reference in New Issue
Block a user