check ajout et edit review quand note invalide
continuous-integration/drone/push Build is passing Details

master
Anthony RICHARD 2 years ago
parent 27aedcc580
commit f6a58fd818

@ -35,6 +35,9 @@ public partial class ReviewPopUp : Popup
}
bool isDouble = double.TryParse(Val.Text, NumberStyles.Float, CultureInfo.InvariantCulture, out double rate);
if (!string.IsNullOrWhiteSpace(Entrytxt.Text) && isDouble)
{
if (rate < 0 || rate > 5) Error.Text = "Note invalide";
else
{
if (editing == true)
{
@ -52,6 +55,7 @@ public partial class ReviewPopUp : Popup
((App)App.Current).Manager.SaveGames();
Close(res);
}
}
else Error.Text = "Champ vide ou invalide";
}
}

Loading…
Cancel
Save