Skip to content

Commit

Permalink
Rename validation method
Browse files Browse the repository at this point in the history
  • Loading branch information
carolinesalib committed May 22, 2020
1 parent 79a2ba5 commit b8cc46c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/javascript/containers/UserSettings/UserSettings.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ const UserSettings = (props) => {
console.log({formErrors})

if (Object.keys(formErrors).length > 0) {
validateInput(updatedUserSettings);
validateForm(updatedUserSettings);
}
}

const validateInput = (userSettings) => {
const validateForm = (userSettings) => {
let formValidation = new FormValidation();

// TODO: phone validation/mask
Expand All @@ -66,7 +66,7 @@ const UserSettings = (props) => {
}

const submitHandler = () => {
if (!validateInput(userSettings)) {
if (!validateForm(userSettings)) {
return
}

Expand Down

0 comments on commit b8cc46c

Please sign in to comment.