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

validation fixes

This commit is contained in:
Matthias Kretschmann 2021-11-19 14:26:39 +00:00
parent 5bb7f327e3
commit c387b27f23
Signed by: m
GPG Key ID: 606EEEF3C479A91F
2 changed files with 4 additions and 2 deletions

View File

@ -38,6 +38,8 @@ export default function ServicesFields(): ReactElement {
// Auto-change access type based on algo privacy boolean.
// Could be also done later in transformPublishFormToDdo().
useEffect(() => {
if (!values.services[0].algorithmPrivacy) return
setFieldValue(
'services[0].access',
values.services[0].algorithmPrivacy === true ? 'compute' : 'download'

View File

@ -112,10 +112,10 @@ const validationPricing = {
.min(1, (param) => `Must be more or equal to ${param.min}`)
.required('Required'),
amountDataToken: Yup.number()
.min(9, (param) => `Must be more or equal to ${param.min}`)
.min(50, (param) => `Must be more or equal to ${param.min}`)
.required('Required'),
amountOcean: Yup.number()
.min(21, (param) => `Must be more or equal to ${param.min}`)
.min(50, (param) => `Must be more or equal to ${param.min}`)
.required('Required'),
type: Yup.string()
.matches(/fixed|dynamic|free/g, { excludeEmptyString: true })