Suggestion accepted

Co-authored-by: chaotixkilla <chaotixkilla@users.noreply.github.com>
This commit is contained in:
Nikola Ubavić 2021-10-25 11:02:49 +02:00 committed by GitHub
parent f294a83ebc
commit 6012c33f81

View file

@ -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)
)
})