Skip to content

Update readme - #91

Open
manuumv wants to merge 1 commit into
Lemoncode:masterfrom
manuumv:master
Open

Update readme#91
manuumv wants to merge 1 commit into
Lemoncode:masterfrom
manuumv:master

Conversation

@manuumv

Copy link
Copy Markdown

In the Validating the entire form example the viewModel is { login, password } and it should be { firstName, lastName }

const viewModel = { login: 'jdoe@example.com', password: 'jdoe3981' };
customerFormValidation
.validateForm(viewModel)
.then((validationResult) => {
console.log(validationResult.success); // true
console.log(validationResult.formGlobalErrors); // []
console.log(validationResult.fieldErrors);
/*{
firstName: { succeeded: true, type: "REQUIRED", key: "firstName", errorMessage: "" },
lastName: { succeeded: true, type: "REQUIRED", key: "lastName", errorMessage: "" }
}*/
})
.catch((error) => {
// handle unexpected errors
});

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@manuumv