diff --git a/src/app/views/home/home.component.html b/src/app/views/home/home.component.html
index eaf9b39..317f7db 100644
--- a/src/app/views/home/home.component.html
+++ b/src/app/views/home/home.component.html
@@ -8,10 +8,11 @@
diff --git a/src/app/views/home/home.component.ts b/src/app/views/home/home.component.ts
index 4550be7..406dc1c 100644
--- a/src/app/views/home/home.component.ts
+++ b/src/app/views/home/home.component.ts
@@ -11,6 +11,7 @@ const chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
})
export class HomeComponent {
code: string = '';
+ valid = false;
constructor(private syncService: SyncService, private router: Router) { }
@@ -21,4 +22,8 @@ export class HomeComponent {
} while (await this.syncService.exists(mapCode));
return this.router.navigate(['/', mapCode]);
}
+
+ isValid() {
+ this.valid = !this.code.split('').filter(c => chars.indexOf(c) == -1).length
+ }
}