Suggestion accepted
Co-authored-by: chaotixkilla <chaotixkilla@users.noreply.github.com>
This commit is contained in:
parent
f294a83ebc
commit
6012c33f81
1 changed files with 1 additions and 4 deletions
|
|
@ -114,10 +114,7 @@ const validationSchema = Yup.object().shape({
|
||||||
.test(
|
.test(
|
||||||
'unique-name',
|
'unique-name',
|
||||||
'Machine name is already in use.',
|
'Machine name is already in use.',
|
||||||
(value, context) => {
|
(value, context) => !context.options.context.machineNames.includes(value)
|
||||||
if (context.options.context.machineNames.includes(value)) return false
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue