function validateProjectName(project_name) {
    var msg = 'Error validating project name. ';
    //Make sure there's something there
    if (project_name === '') {
        return Q.reject(new CordovaError(msg + 'Project name cannot be empty'));
    }

    //Enforce stupid name error
    if (project_name === 'CordovaActivity') {
        return Q.reject(new CordovaError(msg + 'Project name cannot be CordovaActivity'));
    }

    //Classes in Java don't begin with numbers
    if (/^[0-9]/.test(project_name)) {
        return Q.reject(new CordovaError(msg + 'Project name must not begin with a number'));
    }

    return Q.resolve();
}
function validateProjectName(project_name) {
    var msg = 'Error validating project name. ';
    
    if (project_name === '') {
        return Q.reject(new CordovaError(msg + 'Project name cannot be empty'));
    }

    
    if (project_name === 'CordovaActivity') {
        return Q.reject(new CordovaError(msg + 'Project name cannot be CordovaActivity'));
    }

    
    if (/^[0-9]/.test(project_name)) {
        return Q.reject(new CordovaError(msg + 'Project name must not begin with a number'));
    }

    return Q.resolve();
}
function validateProjectName ( project_name ) { var msg = 'Error validating project name. ' ; //Make sure there's something there if ( project_name === '' ) { return Q . reject ( new CordovaError ( msg + 'Project name cannot be empty' ) ) ; } //Enforce stupid name error if ( project_name === 'CordovaActivity' ) { return Q . reject ( new CordovaError ( msg + 'Project name cannot be CordovaActivity' ) ) ; } //Classes in Java don't begin with numbers if ( / ^[0-9] / . test ( project_name ) ) { return Q . reject ( new CordovaError ( msg + 'Project name must not begin with a number' ) ) ; } return Q . resolve ( ) ; }
Test whether a project name is acceptable for use as an android class.
Returns a promise, fulfilled if the project name is acceptable; rejected
otherwise.
Test whether a project name is acceptable for use as an android class . Returns a promise fulfilled if the project name is acceptable ; rejected otherwise .