Clean up basic validation

pull/975/head
Jared Scheib 2017-03-06 21:51:19 -08:00
parent 2e97577605
commit 63ea4d1b8b
1 changed files with 2 additions and 1 deletions

View File

@ -11,7 +11,8 @@ const newDefaultUser = {
} }
const isValid = (user) => { const isValid = (user) => {
return (user.name.length >= 3 && user.password.length >= 3) const minLen = 3
return (user.name.length >= minLen && user.password.length >= minLen)
} }
class UsersTable extends Component { class UsersTable extends Component {