i have this code inside a class, how could i keep the idea of it but updating to use in a function component? I'm trying to change but I can't keep the current proposal
validate = value => { const { formApi: { getValue }, name, } = this.props;