Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TOSTUMI
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Maple
TOSTUMI
Commits
5416935f
Commit
5416935f
authored
Dec 08, 2020
by
cellee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
表单提示必填更改
Signed-off-by:
cellee
<
893264950@qq.com
>
parent
113bb4aa
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
9 deletions
+12
-9
Bookings.tsx
src/pages/CommunityManagement/FacilityBookings/Bookings.tsx
+2
-2
tip.ts
src/utils/tip.ts
+10
-7
No files found.
src/pages/CommunityManagement/FacilityBookings/Bookings.tsx
View file @
5416935f
...
@@ -147,7 +147,7 @@ const Bookings = (props: any) => {
...
@@ -147,7 +147,7 @@ const Bookings = (props: any) => {
message
.
error
(
'User Name Should be limit 2~30!'
,
3
);
message
.
error
(
'User Name Should be limit 2~30!'
,
3
);
}
else
if
(
}
else
if
(
soltTime
&&
soltTime
&&
moment
(
soltTime
[
0
],
'HH:mm'
).
format
(
'
hh'
)
>
moment
(
soltTime
[
1
],
'HH:mm'
).
format
(
'hh
'
)
moment
(
soltTime
[
0
],
'HH:mm'
).
format
(
'
HH'
)
>
moment
(
soltTime
[
1
],
'HH:mm'
).
format
(
'HH
'
)
)
{
)
{
// 判断选的时间 是不是结束时间小于开始时间
// 判断选的时间 是不是结束时间小于开始时间
message
.
error
(
'Appointment time range error'
);
message
.
error
(
'Appointment time range error'
);
...
@@ -253,7 +253,7 @@ const Bookings = (props: any) => {
...
@@ -253,7 +253,7 @@ const Bookings = (props: any) => {
name=
"basic"
name=
"basic"
onFinish=
{
onFinish
}
onFinish=
{
onFinish
}
validateMessages=
{
validateMessages
}
validateMessages=
{
validateMessages
}
autocomplete=
"off"
//
autocomplete="off"
>
>
<
div
className=
"box2 required"
>
<
div
className=
"box2 required"
>
<
div
className=
{
styles
.
box2item1
}
>
Facility Bookings :
</
div
>
<
div
className=
{
styles
.
box2item1
}
>
Facility Bookings :
</
div
>
...
...
src/utils/tip.ts
View file @
5416935f
/*
/*
* @Author: your name
* @Author: your name
* @Date: 2020-11-19 16:54:53
* @Date: 2020-11-19 16:54:53
* @LastEditTime: 2020-12-0
7 16:17:28
* @LastEditTime: 2020-12-0
8 16:20:13
* @LastEditors: Please set LastEditors
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @Description: In User Settings Edit
* @FilePath: \tostumi\src\utils\tip.ts
* @FilePath: \tostumi\src\utils\tip.ts
...
@@ -14,8 +14,9 @@ const inputNumberStr = (rule: any, value: any, callback: any) => {
...
@@ -14,8 +14,9 @@ const inputNumberStr = (rule: any, value: any, callback: any) => {
}
else
{
}
else
{
callback
(
new
Error
(
'Only numbers and letters can be entered!'
));
callback
(
new
Error
(
'Only numbers and letters can be entered!'
));
}
}
}
else
{
callback
(
new
Error
(
'Required!'
));
}
}
callback
();
};
};
// 只能输入数字限制
// 只能输入数字限制
...
@@ -26,8 +27,9 @@ const inputNumber = (rule: any, value: any, callback: any) => {
...
@@ -26,8 +27,9 @@ const inputNumber = (rule: any, value: any, callback: any) => {
}
else
{
}
else
{
callback
(
new
Error
(
'Only numbers!'
));
callback
(
new
Error
(
'Only numbers!'
));
}
}
}
else
{
callback
(
new
Error
(
'Required!'
));
}
}
callback
();
};
};
// 只能输入数字限制 电话提示
// 只能输入数字限制 电话提示
...
@@ -41,8 +43,9 @@ const inputNumberTel = (rule: any, value: any, callback: any) => {
...
@@ -41,8 +43,9 @@ const inputNumberTel = (rule: any, value: any, callback: any) => {
}
else
{
}
else
{
callback
(
new
Error
(
'Please input contact information (8-11 digits)!'
));
callback
(
new
Error
(
'Please input contact information (8-11 digits)!'
));
}
}
}
else
{
callback
(
new
Error
(
'Required!'
));
}
}
callback
();
};
};
const
reqMes
=
(
msg
:
string
)
=>
{
const
reqMes
=
(
msg
:
string
)
=>
{
...
@@ -102,9 +105,9 @@ export const BookingsTip = [
...
@@ -102,9 +105,9 @@ export const BookingsTip = [
[
reqMes
(
'Please input Name '
)],
[
reqMes
(
'Please input Name '
)],
[{
...
reqMes
(
'Please input contact information (8-11 digits)'
),
validator
:
inputNumberTel
}],
[{
...
reqMes
(
'Please input contact information (8-11 digits)'
),
validator
:
inputNumberTel
}],
// [{ required: true, pattern: new RegExp(/^[1-9]\d*$/, 'g'), message: 'Only numbers!')],
// [{ required: true, pattern: new RegExp(/^[1-9]\d*$/, 'g'), message: 'Only numbers!')],
[{
...
reqMes
(
'Only numbers!'
)
,
validator
:
inputNumber
}],
[{
required
:
true
,
message
:
'Only numbers!'
,
validator
:
inputNumber
}],
[{
...
reqMes
(
'Only numbers!'
)
,
validator
:
inputNumber
}],
[{
required
:
true
,
message
:
'Only numbers!'
,
validator
:
inputNumber
}],
[{
...
reqMes
(
'Only numbers and letters can be entered!'
)
,
validator
:
inputNumberStr
}],
[{
required
:
true
,
message
:
'Only numbers!'
,
validator
:
inputNumberStr
}],
[
reqMes
(
'Please Select The Date'
)],
[
reqMes
(
'Please Select The Date'
)],
];
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment