|
|
|
@ -178,13 +178,13 @@ module.exports = function (User) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function isFullnameValid(data) {
|
|
|
|
|
if (data.fullname && (validator.isURL(data.fullname) || data.fullname.length > 255)) {
|
|
|
|
|
if (data.fullname && data.fullname.length > 255) {
|
|
|
|
|
throw new Error('[[error:invalid-fullname]]');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function isLocationValid(data) {
|
|
|
|
|
if (data.location && (validator.isURL(data.location) || data.location.length > 255)) {
|
|
|
|
|
if (data.location && data.location.length > 255) {
|
|
|
|
|
throw new Error('[[error:invalid-location]]');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|