mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
restore error check on input (#1989)
This commit is contained in:
parent
df4349f63f
commit
90b41c72b7
@ -77,16 +77,16 @@ function checkError(
|
|||||||
parsedFieldName: string[],
|
parsedFieldName: string[],
|
||||||
field: FieldInputProps<any>
|
field: FieldInputProps<any>
|
||||||
) {
|
) {
|
||||||
if (
|
const touched = getObjectPropertyByPath(form?.touched, field?.name)
|
||||||
(form?.touched?.[parsedFieldName[0]]?.[parsedFieldName[1]] &&
|
const errors = getObjectPropertyByPath(form?.errors, field?.name)
|
||||||
form?.errors?.[parsedFieldName[0]]?.[parsedFieldName[1]]) ||
|
|
||||||
(form?.touched[field?.name] &&
|
return (
|
||||||
form?.errors[field?.name] &&
|
touched &&
|
||||||
field.name !== 'files' &&
|
errors &&
|
||||||
field.name !== 'links')
|
!field.name.endsWith('.files') &&
|
||||||
) {
|
!field.name.endsWith('.links') &&
|
||||||
return true
|
!field.name.endsWith('consumerParameters')
|
||||||
}
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function Input(props: Partial<InputProps>): ReactElement {
|
export default function Input(props: Partial<InputProps>): ReactElement {
|
||||||
|
Loading…
Reference in New Issue
Block a user