mirror of
https://github.com/TryGhost/Ghost-Admin.git
synced 2023-12-14 02:33:04 +01:00
Merge pull request #2922 from lholmquist/user_model
Update user model logic for Ember Inspector.
This commit is contained in:
commit
5264e2c29e
1 changed files with 3 additions and 5 deletions
|
@ -41,11 +41,9 @@ var User = DS.Model.extend({
|
|||
validationErrors.push({message: 'Location is too long'});
|
||||
}
|
||||
|
||||
if (this.get('website').length) {
|
||||
if (!validator.isURL(this.get('website'), { protocols: ['http', 'https'], require_protocol: true }) ||
|
||||
!validator.isLength(this.get('website'), 0, 2000)) {
|
||||
validationErrors.push({message: 'Please use a valid url'});
|
||||
}
|
||||
if (!validator.isURL(this.get('website'), { protocols: ['http', 'https'], require_protocol: true }) ||
|
||||
!validator.isLength(this.get('website'), 0, 2000)) {
|
||||
validationErrors.push({message: 'Please use a valid url'});
|
||||
}
|
||||
|
||||
return validationErrors;
|
||||
|
|
Loading…
Reference in a new issue