Skip to content

The value is not trimmed  #1

@OmarZeidan

Description

@OmarZeidan
Hello Teacher,
I added the following small jQuery utility to your source code I have, hope what I did is completely true.

The line I change :

return emailRegExp.test($.trim($input.val())); // I added $.trim to handle the white space entered by the user.

The issue scenario:

When the user enter some spaces before adding a valid email address the validation will return false! even if the address is true!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions