Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function validateString(string, validcharstring) {
- // Very simple string validation
- var result = true;
- for (i=0; i< string.length; i++) {
- if ( validcharstring.indexOf( string[i] ) == -1 ) {
- result = false;
- break;
- }
- }
- return result;
- }
Add Comment
Please, Sign In to add comment