<commit_before>app.directive("regexp" , function() {
    return {
        restrict: 'A',
        link: function(scope, controller) {
            scope.$watch('userReg.userName', function(newValue) {
                if (newValue == null) {
                    scope.validator.username = true;
                } else {
                    if (/^[a-zA-Z0-9]{1,}$/.test(newValue)) {
                        scope.validator.username = true;
                    } else {
                        scope.validator.username = false;
                    }
                }
            });
        }<commit_msg>add character limit to username in directive<commit_after>app.directive("regexp" , function() {
    return {
        restrict: 'A',
        link: function(scope, controller) {
            scope.$watch('userReg.userName', function(newValue) {
                if (newValue == null) {
                    scope.validator.username = true;
                } else {
                    if (/^[a-zA-Z0-9\_\-]{1,12}$/.test(newValue)) {
                        scope.validator.username = true;
                    } else {
                        scope.validator.username = false;
                    }
                }
            });
        }
{'fraction_non_alphanumeric': 0.12530315278900567, 'fraction_numerical': 0.0064672594987873885, 'mean_word_length': 1.1418685121107266, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '735024', 'n_tokens_mistral': 329, 'n_tokens_neox': 309, 'n_words': 52}