The `onSubmit` hook will only be triggered when the form is valid, so we need to clear the contents of `serializedData` in advance in `submit`. Otherwise, it may not throw a validation error.
The `onSubmit` hook will only be triggered when the form is valid, so we need to clear the contents of `serializedData` in advance in `submit`. Otherwise, it may not throw a validation error.