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:
parent
ef5b236482
commit
908acb1e7b
@ -72,11 +72,7 @@ export interface InputProps {
|
|||||||
disclaimerValues?: string[]
|
disclaimerValues?: string[]
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkError(
|
function checkError(form: any, field: FieldInputProps<any>) {
|
||||||
form: any,
|
|
||||||
parsedFieldName: string[],
|
|
||||||
field: FieldInputProps<any>
|
|
||||||
) {
|
|
||||||
const touched = getObjectPropertyByPath(form?.touched, field?.name)
|
const touched = getObjectPropertyByPath(form?.touched, field?.name)
|
||||||
const errors = getObjectPropertyByPath(form?.errors, field?.name)
|
const errors = getObjectPropertyByPath(form?.errors, field?.name)
|
||||||
|
|
||||||
@ -85,7 +81,8 @@ function checkError(
|
|||||||
errors &&
|
errors &&
|
||||||
!field.name.endsWith('.files') &&
|
!field.name.endsWith('.files') &&
|
||||||
!field.name.endsWith('.links') &&
|
!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.
|
// handling flat and nested data at same time.
|
||||||
const parsedFieldName =
|
const parsedFieldName =
|
||||||
isFormikField && (isNestedField ? field?.name.split('.') : [field?.name])
|
isFormikField && (isNestedField ? field?.name.split('.') : [field?.name])
|
||||||
const hasFormikError = checkError(form, parsedFieldName, field)
|
const hasFormikError = checkError(form, field)
|
||||||
|
|
||||||
const styleClasses = cx({
|
const styleClasses = cx({
|
||||||
field: true,
|
field: true,
|
||||||
|
Loading…
Reference in New Issue
Block a user