Imput lentght restricted to 10 chars.

Comparison done case insensitve.
This commit is contained in:
Oliver Hauff 2021-07-14 23:30:17 +02:00
parent 0c0baf1b10
commit d874877998
2 changed files with 2 additions and 1 deletions

View file

@ -14,6 +14,7 @@
<Entry
Placeholder="Fahrrad-Nummer bitte hier eingeben"
IsVisible="{Binding IsSelectBikeVisible}"
MaxLength="10"
Text="{Binding BikeIdUserInput}">
</Entry>
<Button

View file

@ -116,7 +116,7 @@ namespace TINK.ViewModel.FindBike
/// <summary> Select a bike by ID</summary>
public async Task SelectBike()
{
var selectedBike = Bikes.FirstOrDefault(x => x.Id == BikeIdUserInput);
var selectedBike = Bikes.FirstOrDefault(x => x.Id.Equals(BikeIdUserInput.Trim(), StringComparison.OrdinalIgnoreCase));
if (selectedBike == null)
{