Skip to content

Commit 5d351b0

Browse files
authored
Merge pull request #146 from lirantal/fix/profile-page-fields-on-error
fix(profile): the form should populate send fields
2 parents cb59313 + 20c6193 commit 5d351b0

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

app/routes/profile.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,16 @@ function ProfileHandler(db) {
5151
var testComplyWithRequirements = regexPattern.test(bankRouting);
5252
// if the regex test fails we do not allow saving
5353
if (testComplyWithRequirements !== true) {
54+
const firstNameSafeString = firstName
5455
return res.render("profile", {
55-
updateError: "Bank Routing number does not comply with requirements for format specified"
56+
updateError: "Bank Routing number does not comply with requirements for format specified",
57+
firstNameSafeString,
58+
lastName,
59+
ssn,
60+
dob,
61+
address,
62+
bankAcc,
63+
bankRouting
5664
});
5765
}
5866

0 commit comments

Comments
 (0)