- no restraints on client name and description (neither of them required)

- URI regex updated
pull/105/merge
Michael Jett 2012-05-22 12:23:05 -04:00
parent 9a35668183
commit e4f2446569
2 changed files with 8 additions and 8 deletions

View File

@ -18,15 +18,15 @@
validate:{
clientName:{
required:true,
/* required:true,
pattern:/^[\w ]+$/,
minlength:3,
minlength:3,*/
maxlength:100
},
clientDescription:{
required:true,
/*required:true,
pattern:/^[\w ]+$/,
minlength:3,
minlength:3,*/
maxlength:200
},
accessTokenTimeout: {
@ -44,7 +44,7 @@
validateURI: function(attributeName, attributeValue) {
var expression = /[-a-zA-Z0-9@:%_\+.~#?&//=]{2,256}\.[a-z]{2,4}\b(\/[-a-zA-Z0-9@:%_\+.~#?&//=]*)?/gi;
var expression = /^(?:([a-z0-9+.-]+:\/\/)((?:(?:[a-z0-9-._~!$&'()*+,;=:]|%[0-9A-F]{2})*)@)?((?:[a-z0-9-._~!$&'()*+,;=]|%[0-9A-F]{2})*)(:(?:\d*))?(\/(?:[a-z0-9-._~!$&'()*+,;=:@\/]|%[0-9A-F]{2})*)?|([a-z0-9+.-]+:)(\/?(?:[a-z0-9-._~!$&'()*+,;=:@]|%[0-9A-F]{2})+(?:[a-z0-9-._~!$&'()*+,;=:@\/]|%[0-9A-F]{2})*)?)(\?(?:[a-z0-9-._~!$&'()*+,;=:\/?@]|%[0-9A-F]{2})*)?(#(?:[a-z0-9-._~!$&'()*+,;=:\/?@]|%[0-9A-F]{2})*)?$/i;
var regex = new RegExp(expression);
if (!attributeValue.every(function (url) {

View File

@ -94,7 +94,7 @@
<div class="span6">
<span class="control-group" id="clientName">
<label>Client name</label>
<input value="<%=clientName%>" type="text" class="" placeholder="Type something"> <span class="help-inline">This must be more than three characters and can only be alpha-numeric </span>
<input value="<%=clientName%>" maxlength="100" type="text" class="" placeholder="Type something"> <span class="help-inline"></span>
</span>
<span class="control-group" id="registeredRedirectUri">
<label>Redirect URI(s)</label>
@ -105,8 +105,8 @@
<div class="span6">
<span class="control-group" id="clientDescription">
<label>Description</label>
<textarea class="input-xlarge" placeholder="Type a description"
rows="3"><%=clientDescription%></textarea> <span class="help-inline">This must be more than three characters and can only be alpha-numeric</span>
<textarea class="input-xlarge" placeholder="Type a description" maxlength="200"
rows="3"><%=clientDescription%></textarea> <span class="help-inline"></span>
</span>
</div>
</div>