Fix typos in channel.jade; fix username regex

This commit is contained in:
calzoneman 2013-12-26 22:35:47 -05:00
parent c213dd1374
commit 5fe5dd440e
2 changed files with 17 additions and 4 deletions

View File

@ -32,13 +32,26 @@ Set.prototype.forEach = function (fn) {
}
};
var USERNAME_REGEX = new RegExp(
"^[-\\w" + // Hyphen and a-zA-Z0-9_
"\\u00c0-\\u00c5" + // Uppercase A
"\\u00c7-\\u00cf" + // Uppercase C, E and I
"\\u00d1-\\u00d6" + // Uppercase N and O
"\\u00d9-\\u00dd" + // Uppercase U and Y
"\\u00e0-\\u00e5" + // Lowercase A
"\\u00e7-\\u00ef" + // Lowercase C, E anf I
"\\u00f1-\\u00f6" + // Lowercase N anf O
"\\u00f9-\\u00ff" + // Lowercase U anf Y
"]{1,20}$"
);
module.exports = {
isValidChannelName: function (name) {
return name.match(/^[\w-_]{1,30}$/);
},
isValidUserName: function (name) {
return name.match(/^[-\w\u00c0-\u00ff]{1,20}$/);
return name.match(USERNAME_REGEX);
},
isValidEmail: function (email) {

View File

@ -43,7 +43,7 @@ html(lang="en")
span.input-group-addon Guest login
input#guestname.form-control(type="text", placeholder="Name")
#videowrap.col-lg-7.col-md-7
p#currenttitle Nothing Playling
p#currenttitle Nothing Playing
#ytapiplayer
#controlsrow.row
#leftcontrols.col-lg-5.col-md-5
@ -134,7 +134,7 @@ html(lang="en")
.modal-dialog
.modal-content
.modal-header
button.close(data-dismiss="modal", aria-hidden="true")×
button.close(data-dismiss="modal", aria-hidden="true") ×
h4 User Preferences
ul.nav.nav-tabs
li: a(href="#us-general", data-toggle="tab") General
@ -155,7 +155,7 @@ html(lang="en")
.modal-dialog
.modal-content
.modal-header
button.close(data-dismiss="modal", aria-hidden="true")×
button.close(data-dismiss="modal", aria-hidden="true") ×
h4 Channel Settings
ul.nav.nav-tabs
li: a(href="#cs-miscoptions" data-toggle="tab") General Settings