You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 1, 2024. It is now read-only.
In the Maui Community Tookit, the NumericValidationBehavior throws an exception if the entry field is empty.
Looking at the source, the first line in ValidateAsync throws an ArgumentNullException if the value is null. Unless I’m missing something, there’s no way to catch that and it crashes the app.
It should just return false. Ideally, there would be an IsRequired property that would allow it to return true if the value was null or empty.
Steps to Reproduce
Create a page with an entry field.
Add a NumericValidationBehavior and set the validation behavior to on lose focus
Tap the entry field and then tap something else to take way it's focus
Boom. It crashes the app
Expected Behavior
You can leave a field empty without crashing the app
Actual Behavior
It crashes the app
Basic Information
Version with issue: 5.3.0
Last known good version: n/a
IDE: Visual Studio for Mac
Platform Target Frameworks:
iOS: 16.1
Android: 13
Windows: n/a
Nuget Packages:
Affected Devices: All
Workaround
No. I downloaded the source and created a local version with the change.
The text was updated successfully, but these errors were encountered:
Description
In the Maui Community Tookit, the NumericValidationBehavior throws an exception if the entry field is empty.
Looking at the source, the first line in ValidateAsync throws an ArgumentNullException if the value is null. Unless I’m missing something, there’s no way to catch that and it crashes the app.
It should just return false. Ideally, there would be an IsRequired property that would allow it to return true if the value was null or empty.
Steps to Reproduce
Expected Behavior
You can leave a field empty without crashing the app
Actual Behavior
It crashes the app
Basic Information
Workaround
No. I downloaded the source and created a local version with the change.
The text was updated successfully, but these errors were encountered: