How to validate before submit - TanStack