diff --git a/src/forge/Team/New.jsx b/src/forge/Team/New.jsx index f314cfa80..cd3de57cf 100644 --- a/src/forge/Team/New.jsx +++ b/src/forge/Team/New.jsx @@ -1,15 +1,15 @@ import React,{ forwardRef , useCallback , useEffect, useState } from 'react'; import './Index.scss'; -import { Form , Input , Radio , Checkbox , Button, InputNumber } from "antd"; +import { Form , Input , Radio , Checkbox , Button } from "antd"; import UploadImage from './Component/UploadImage'; import axios from 'axios'; - +const port = window.location.port; +const hostname = window.location.hostname; export default Form.create()( forwardRef(({ form , showNotification , history })=>{ const [ image , setImage ] = useState(undefined); const [ imageFlag , setImageFlag] = useState(false); const { getFieldDecorator, validateFields , setFieldsValue } = form; - const radioStyle = { display: 'block', height: '30px', @@ -60,19 +60,44 @@ export default Form.create()( }) },[]) + function checkname(rule, value, callback){ + if(!value){ + callback(); + } + if(value && !value.match(/^[a-zA-Z][a-zA-Z\d]{3,14}$/)){ + callback("只能使用英文字母和数字,以字母开头,长度为4到15个字符"); + } + callback(); + } + return(
新建组织