- no restraints on client name and description (neither of them required)
- URI regex updatedpull/105/merge
parent
9a35668183
commit
e4f2446569
|
@ -18,15 +18,15 @@
|
||||||
|
|
||||||
validate:{
|
validate:{
|
||||||
clientName:{
|
clientName:{
|
||||||
required:true,
|
/* required:true,
|
||||||
pattern:/^[\w ]+$/,
|
pattern:/^[\w ]+$/,
|
||||||
minlength:3,
|
minlength:3,*/
|
||||||
maxlength:100
|
maxlength:100
|
||||||
},
|
},
|
||||||
clientDescription:{
|
clientDescription:{
|
||||||
required:true,
|
/*required:true,
|
||||||
pattern:/^[\w ]+$/,
|
pattern:/^[\w ]+$/,
|
||||||
minlength:3,
|
minlength:3,*/
|
||||||
maxlength:200
|
maxlength:200
|
||||||
},
|
},
|
||||||
accessTokenTimeout: {
|
accessTokenTimeout: {
|
||||||
|
@ -44,7 +44,7 @@
|
||||||
|
|
||||||
validateURI: function(attributeName, attributeValue) {
|
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);
|
var regex = new RegExp(expression);
|
||||||
|
|
||||||
if (!attributeValue.every(function (url) {
|
if (!attributeValue.every(function (url) {
|
||||||
|
|
|
@ -94,7 +94,7 @@
|
||||||
<div class="span6">
|
<div class="span6">
|
||||||
<span class="control-group" id="clientName">
|
<span class="control-group" id="clientName">
|
||||||
<label>Client name</label>
|
<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>
|
||||||
<span class="control-group" id="registeredRedirectUri">
|
<span class="control-group" id="registeredRedirectUri">
|
||||||
<label>Redirect URI(s)</label>
|
<label>Redirect URI(s)</label>
|
||||||
|
@ -105,8 +105,8 @@
|
||||||
<div class="span6">
|
<div class="span6">
|
||||||
<span class="control-group" id="clientDescription">
|
<span class="control-group" id="clientDescription">
|
||||||
<label>Description</label>
|
<label>Description</label>
|
||||||
<textarea class="input-xlarge" placeholder="Type a description"
|
<textarea class="input-xlarge" placeholder="Type a description" maxlength="200"
|
||||||
rows="3"><%=clientDescription%></textarea> <span class="help-inline">This must be more than three characters and can only be alpha-numeric</span>
|
rows="3"><%=clientDescription%></textarea> <span class="help-inline"></span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue