1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00

Fix custom docker image fields (#1978)

* add validation to custom docker image fields

* updated validation logic

* fix build
This commit is contained in:
Bogdan Fazakas 2023-10-18 16:51:31 +03:00 committed by GitHub
parent ba17184cf8
commit 0c5a29d654
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,6 +25,18 @@ const validationMetadata = {
.required('Required'), .required('Required'),
author: Yup.string().required('Required'), author: Yup.string().required('Required'),
tags: Yup.array<string[]>().nullable(), tags: Yup.array<string[]>().nullable(),
dockerImage: Yup.string().when('type', {
is: 'algorithm',
then: Yup.string().required('Required')
}),
dockerImageCustomChecksum: Yup.string().when('type', {
is: 'algorithm',
then: Yup.string().required('Required')
}),
dockerImageCustomEntrypoint: Yup.string().when('type', {
is: 'algorithm',
then: Yup.string().required('Required')
}),
termsAndConditions: Yup.boolean() termsAndConditions: Yup.boolean()
.required('Required') .required('Required')
.isTrue('Please agree to the Terms and Conditions.'), .isTrue('Please agree to the Terms and Conditions.'),