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

max param for description length (#1349)

Co-authored-by: ClaudiaHolhos <claudia@oceanprotocol.com>
This commit is contained in:
claudiaHash 2022-04-15 15:33:51 +03:00 committed by GitHub
parent e4a8c0df64
commit cc0da26740
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,6 +16,10 @@ const validationMetadata = {
.required('Required'),
description: Yup.string()
.min(10, (param) => `Description must be at least ${param.min} characters`)
.max(
5000,
(param) => `Description must have maximum ${param.max} characters`
)
.required('Required'),
author: Yup.string().required('Required'),
tags: Yup.string().nullable(),