Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- renderInput = ({ input, meta, placeholder, ...props }) => {
- const error = (meta.error && meta.touched && !meta.active) || false
- const isValid = !meta.error && meta.touched && !meta.active
- return (
- <Input
- {...input}
- {...props}
- error={error}
- isValid={isValid}
- placeholder={error ? meta.error : placeholder}
- />
- )
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement