Skip to content

Commit

Permalink
Punctuation fixes in “Client-side form validation” code comments (#5597)
Browse files Browse the repository at this point in the history
Made punctuation changes to end of line comments (inserted commas) starting
in line 588. No code changes were made.
  • Loading branch information
cherylhughey authored Jun 2, 2021
1 parent 1827d39 commit 7ac6d8d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions files/en-us/learn/forms/form_validation/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -585,15 +585,15 @@ <h4 id="A_more_detailed_example">A more detailed example</h4>

function showError() {
if(email.validity.valueMissing) {
// If the field is empty
// If the field is empty,
// display the following error message.
emailError.textContent = 'You need to enter an e-mail address.';
} else if(email.validity.typeMismatch) {
// If the field doesn't contain an email address
// If the field doesn't contain an email address,
// display the following error message.
emailError.textContent = 'Entered value needs to be an e-mail address.';
} else if(email.validity.tooShort) {
// If the data is too short
// If the data is too short,
// display the following error message.
emailError.textContent = `Email should be at least ${ email.minLength } characters; you entered ${ email.value.length }.`;
}
Expand Down

0 comments on commit 7ac6d8d

Please sign in to comment.