Skip to content

Commit

Permalink
added password validation
Browse files Browse the repository at this point in the history
  • Loading branch information
sssss465 committed Dec 4, 2017
1 parent 4eafab3 commit b34d818
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ app.post('/register', (req, res) => {
}), req.body.password, (err, account) => {
if (err) {
return res.render('register', {
err: account
err: err.message
});
console.log(account);
// res.send({err: account});
Expand Down
3 changes: 3 additions & 0 deletions views/register.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{{#if err}}
<h4 style="color:red;">{{err}}<h4>
{{/if}}
<div class="row">
<form class="col s12" method="POST" action="{{act}}">
<div class="row">
Expand Down

0 comments on commit b34d818

Please sign in to comment.