mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
validation fixes
This commit is contained in:
parent
5bb7f327e3
commit
c387b27f23
@ -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'
|
||||
|
@ -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 })
|
||||
|
Loading…
Reference in New Issue
Block a user