Permalink
Cannot retrieve contributors at this time
24 lines (22 sloc)
753 Bytes
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
SaveResults/js/that-value.js /
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * that-value@0.1.3 | |
| * Package Manager: npm | |
| * Link to published package: https://github.com/q-nick/that-value | |
| * Link to GitHub repo: https://github.com/q-nick/that-value | |
| * Severity level: High | |
| * Module Description: Multi language/platform pack of validators (front-end and back-end) | |
| * Additional Info: It allows cause a denial of service when validating crafted invalid emails. | |
| * Contacted maintainer?: No | |
| * Open issue?: No | |
| */ | |
| var thatValue = require("that-value") | |
| var emailValue = thatValue('00.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!.!!').is.string().is.email().and.contains('paul'); | |
| if(emailValue.valid()) | |
| { | |
| /* when valid */ | |
| } | |
| else | |
| { | |
| /*not valid*/ | |
| var errorList = emailValue.getErrors(); | |
| } |