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(
|
||||
'unique-name',
|
||||
'Machine name is already in use.',
|
||||
(value, context) => {
|
||||
if (context.options.context.machineNames.includes(value)) return false
|
||||
return true
|
||||
}
|
||||
(value, context) => !context.options.context.machineNames.includes(value)
|
||||
)
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue