tgriesser / checkit

simple, flexible validations for node and the browser
MIT License
223 stars 53 forks source link

string validator? #50

Closed VictorioBerra closed 8 years ago

VictorioBerra commented 8 years ago

I see the alpha stuff but nothing seems to also take into account numbers and special chars.

Do I need to use my own?

function string(val) {
    if (typeof(val) !== "string") {
        throw new Error('Value must be a string.');
    }
}
rhys-vdw commented 8 years ago

@LordWingZero you'll have to read the source. If you find an answer it would be good if you could open a PR either adding the feature and/or updating the docs.