mirror of
https://github.com/harness/drone.git
synced 2025-05-10 01:49:56 +08:00
* Fix import space name validator (#3491)
import a space should has same regex validator as create a space
This commit is contained in:
parent
38510ca0c1
commit
8893d55eb1
@ -71,7 +71,11 @@ const ImportSpaceForm = (props: ImportFormProps) => {
|
||||
|
||||
const validationSchemaStepTwo = yup.object().shape({
|
||||
organization: yup.string().trim().required(getString('importSpace.orgRequired')),
|
||||
name: yup.string().trim().required(getString('importSpace.spaceNameRequired'))
|
||||
name: yup
|
||||
.string()
|
||||
.trim()
|
||||
.required(getString('importSpace.spaceNameRequired'))
|
||||
.matches(/^[a-zA-Z_][a-zA-Z0-9-_.]*$/, getString('validation.nameLogic'))
|
||||
})
|
||||
|
||||
return (
|
||||
|
Loading…
Reference in New Issue
Block a user