private bool ValidateEntries() { bool isValidUser = Email.Validate(); bool isValidFullName = FullName.Validate(); bool isValidBirthDate = BirthDate.Validate(); bool isValidPhoneNumber = PhoneNumber.Validate(); bool isValidPassword = Password.Validate(); bool isValidConfirmPassword = ConfirmPassword.Validate(); return(isValidUser && isValidFullName && isValidBirthDate && isValidPhoneNumber && isValidPassword && isValidConfirmPassword); }
private void OnCreateAccauntCommand() { System.Diagnostics.Debug.WriteLine("Create accaunt"); if (!Email.Validate() || !Password.Validate() || !ConfirmPassword.Validate()) { var errorMessage = string.Empty; if (Email.ErrorsMessages.Any()) { errorMessage = Email.ErrorsMessages.First(); } else if (Password.ErrorsMessages.Any()) { errorMessage = Password.ErrorsMessages.First(); } else { errorMessage = ConfirmPassword.ErrorsMessages.First(); } Application.Current.MainPage.DisplayAlert("ERROR", errorMessage, "OK"); } }