scripts/validate.js
/**
 * This method validates any input against injections or emptiness
 * 
 * @param anInput
 * 
 * @return boolean
 */
This method validates any input against injections or emptiness

@param anInput

@return boolean
This method validates any input against injections or emptiness @param anInput @return boolean
function validateClientSide(anInput){
    if(/\b(ALTER|CREATE|DELETE|DROP|EXEC(UTE){0,1}|INSERT( +INTO){0,1}|MERGE|SELECT|UPDATE|UNION( +ALL){0,1})\b|<|>|^$/.test(anInput) == true){
        document.getElementById("inputErrors").innerHTML = "Invalid Input";
        return false;
    }
}
function validateClientSide ( anInput ) { if ( / \b(ALTER|CREATE|DELETE|DROP|EXEC(UTE){0,1}|INSERT( +INTO){0,1}|MERGE|SELECT|UPDATE|UNION( +ALL){0,1})\b|<|>|^$ / . test ( anInput ) == true ) { document . getElementById ( "inputErrors" ) . innerHTML = "Invalid Input" ; return false ; } }
This method validates any input against injections or emptiness
This method validates any input against injections or emptiness