aboutsummaryrefslogtreecommitdiffstats
path: root/apps/mobile
diff options
context:
space:
mode:
Diffstat (limited to 'apps/mobile')
-rw-r--r--apps/mobile/app/signin.tsx13
1 files changed, 13 insertions, 0 deletions
diff --git a/apps/mobile/app/signin.tsx b/apps/mobile/app/signin.tsx
index 31cb1e01..17a2158d 100644
--- a/apps/mobile/app/signin.tsx
+++ b/apps/mobile/app/signin.tsx
@@ -84,6 +84,19 @@ export default function Signin() {
}
const onSignin = () => {
+ if (!formState.serverAddress) {
+ setError("Server address is required");
+ return;
+ }
+
+ if (
+ !formState.serverAddress.startsWith("http://") &&
+ !formState.serverAddress.startsWith("https://")
+ ) {
+ setError("Server address must start with http:// or https://");
+ return;
+ }
+
if (loginType === LoginType.Password) {
const randStr = (Math.random() + 1).toString(36).substring(5);
login({