diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2017-03-03 09:24:17 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2017-03-03 09:24:17 +0900 |
| commit | 42ed35bfc95147c89cb0dc3d61d8982b2646c1ca (patch) | |
| tree | 316acb0aace3e980ccc20c045c810cd719377cbd /src/api/models/user.ts | |
| parent | wip (diff) | |
| download | sharkey-42ed35bfc95147c89cb0dc3d61d8982b2646c1ca.tar.gz sharkey-42ed35bfc95147c89cb0dc3d61d8982b2646c1ca.tar.bz2 sharkey-42ed35bfc95147c89cb0dc3d61d8982b2646c1ca.zip | |
wip
Diffstat (limited to 'src/api/models/user.ts')
| -rw-r--r-- | src/api/models/user.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/api/models/user.ts b/src/api/models/user.ts index 5ab39d7c92..cd16459891 100644 --- a/src/api/models/user.ts +++ b/src/api/models/user.ts @@ -19,6 +19,14 @@ export function isValidName(name: string): boolean { return typeof name == 'string' && name.length < 30 && name.trim() != ''; } +export function isValidDescription(description: string): boolean { + return typeof description == 'string' && description.length < 500 && description.trim() != ''; +} + +export function isValidLocation(location: string): boolean { + return typeof location == 'string' && location.length < 50 && location.trim() != ''; +} + export function isValidBirthday(birthday: string): boolean { return typeof birthday == 'string' && /^([0-9]{4})\-([0-9]{2})-([0-9]{2})$/.test(birthday); } |