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

remove provider url from check error method (#1992)

This commit is contained in:
Enzo Vezzaro 2023-11-14 08:19:40 -04:00 committed by GitHub
parent ef5b236482
commit 908acb1e7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -72,11 +72,7 @@ export interface InputProps {
disclaimerValues?: string[]
}
function checkError(
form: any,
parsedFieldName: string[],
field: FieldInputProps<any>
) {
function checkError(form: any, field: FieldInputProps<any>) {
const touched = getObjectPropertyByPath(form?.touched, field?.name)
const errors = getObjectPropertyByPath(form?.errors, field?.name)
@ -85,7 +81,8 @@ function checkError(
errors &&
!field.name.endsWith('.files') &&
!field.name.endsWith('.links') &&
!field.name.endsWith('consumerParameters')
!field.name.endsWith('consumerParameters') &&
!field.name.endsWith('.providerUrl')
)
}
@ -109,7 +106,7 @@ export default function Input(props: Partial<InputProps>): ReactElement {
// handling flat and nested data at same time.
const parsedFieldName =
isFormikField && (isNestedField ? field?.name.split('.') : [field?.name])
const hasFormikError = checkError(form, parsedFieldName, field)
const hasFormikError = checkError(form, field)
const styleClasses = cx({
field: true,