public static async Task <bool> Validate(Page page, Account account, string pass) { if (account.Application == null || account.Application.Length <= 0) { await page.DisplayAlert("Błąd", "Niepoprawna nazwa aplikacji", "Rozumiem"); return(false); } if (account.Login == null || account.Login.Length <= 0 || !ValidationUtils.IsUsername(account.Login)) { await page.DisplayAlert("Błąd", "Niepoprawna nazwa użytkownika", "Rozumiem"); return(false); } if (pass == null || pass.Length <= 0) { await page.DisplayAlert("Błąd", "Niepoprawna długość hasła", "Rozumiem"); return(false); } if (account.Email == null || account.Email.Length <= 0 || !ValidationUtils.IsEmail(account.Email)) { await page.DisplayAlert("Błąd", "Niepoprawny adres email", "Rozumiem"); return(false); } return(true); }