Open martin-obert opened 1 week ago
Schema is required...
I've looked up for schema in the docs, but without luck. Can you please provide more details, what schema are you referencing to. Any code example?
Hello @martin-obert,
if you need to access values in the onFormSubmit method, ensure that your resolver returns both the values and errors, like this:
const resolver = ({ values }) => {
const errors = {};
if (!values.username) {
errors.username = [{ message: 'Username is required.' }];
}
return {
errors,
values
};
};
During form submission, the resolver first validates the form. A callback is then triggered, providing information about the form's current state (see the Form Submit section here). This callback is partially composed of the resolver’s return values and errors.
Bug description
Submiting form doesn't pass values in the event as described at your official docu https://primevue.org/forms/ Trying any official example via stackblitz yields same result: Submit example on your official site
Am I missing something? How do I get the actual submitted data?
Reproducer
https://stackblitz.com/edit/kcnxrq?file=src%2FApp.vue
PrimeVue version
4.2.1
Vue version
3.x
Language
TypeScript
Build / Runtime
Vue CLI App
Browser(s)
Chrome 90
Steps to reproduce the behavior
Click on Submit button and observe the browser console
Expected behavior
text from input field should appear in the console output