Commit 3fd6b643 authored by XieZhiXiong's avatar XieZhiXiong

fix: 追加校验

parent b69d653b
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2020-12-30 14:49:11 * @Date: 2020-12-30 14:49:11
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-30 14:56:41 * @LastEditTime: 2021-01-04 10:50:14
* @Description: * @Description:
*/ */
import { ISchema } from '@formily/antd'; import { ISchema } from '@formily/antd';
import { UPLOAD_TYPE } from '@/constants'; import { PATTERN_MAPS } from '@/constants/regExp';
export const repaymentModalSchema: ISchema = { export const repaymentModalSchema: ISchema = {
type: 'object', type: 'object',
...@@ -25,12 +25,17 @@ export const repaymentModalSchema: ISchema = { ...@@ -25,12 +25,17 @@ export const repaymentModalSchema: ISchema = {
'x-component-props': { 'x-component-props': {
placeholder: '', placeholder: '',
addonBefore: '¥', addonBefore: '¥',
step: 0.01,
}, },
'x-rules': [ 'x-rules': [
{ {
required: true, required: true,
message: '请填写还款金额', message: '请填写还款金额',
}, },
{
pattern: /^[1-9]+[0-9]*(?:\.\d{0,2})?$/,
message: '请填写大于0的正数',
},
], ],
}, },
amountSlide: { amountSlide: {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2020-09-29 15:51:31 * @Date: 2020-09-29 15:51:31
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-04 10:01:52 * @LastEditTime: 2021-01-04 10:44:01
* @Description: * @Description:
*/ */
import { ISchema } from '@formily/antd'; import { ISchema } from '@formily/antd';
...@@ -48,6 +48,7 @@ export const editModalSchema: ISchema = { ...@@ -48,6 +48,7 @@ export const editModalSchema: ISchema = {
// label: '{{MaxMarks}}', // label: '{{MaxMarks}}',
// }, // },
// }, // },
step: 0.01,
style: { style: {
margin: '0 20px 28px' margin: '0 20px 28px'
}, },
......
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