Remove simple memoize from required validator
This commit is contained in:
parent
7fdf4d3534
commit
27d7979b54
|
@ -18,7 +18,7 @@ export const simpleMemoize = (fn: Function) => {
|
|||
|
||||
type Field = boolean | string | null | typeof undefined
|
||||
|
||||
export const required = simpleMemoize((value: Field) => (value ? undefined : 'Required'))
|
||||
export const required = (value: Field) => (value ? undefined : 'Required')
|
||||
|
||||
export const mustBeInteger = (value: string) => (!Number.isInteger(Number(value)) || value.includes('.') ? 'Must be an integer' : undefined)
|
||||
|
||||
|
|
|
@ -52,7 +52,6 @@ export const safeFieldsValidation = async (values: Object) => {
|
|||
const web3 = getWeb3()
|
||||
|
||||
if (!safeAddress || mustBeEthereumAddress(safeAddress) !== undefined) {
|
||||
errors[FIELD_LOAD_ADDRESS] = 'Required'
|
||||
return errors
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue