about summary refs log tree commit diff
path: root/src/state/models/ui/create-account.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/state/models/ui/create-account.ts')
-rw-r--r--src/state/models/ui/create-account.ts10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/state/models/ui/create-account.ts b/src/state/models/ui/create-account.ts
index 78ffe8858..d35b3557d 100644
--- a/src/state/models/ui/create-account.ts
+++ b/src/state/models/ui/create-account.ts
@@ -31,13 +31,21 @@ export class CreateAccountModel {
     makeAutoObservable(this, {}, {autoBind: true})
   }
 
+  get isAge13() {
+    return getAge(this.birthDate) >= 13
+  }
+
+  get isAge18() {
+    return getAge(this.birthDate) >= 18
+  }
+
   // form state controls
   // =
 
   next() {
     this.error = ''
     if (this.step === 2) {
-      if (getAge(this.birthDate) < 13) {
+      if (!this.isAge13) {
         this.error =
           'Unfortunately, you do not meet the requirements to create an account.'
         return