Skip to content

Commit

Permalink
fixed #190 bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
codersangam committed Oct 28, 2023
1 parent 81d9d0f commit 57ae963
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/extensions/string_ext.dart
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ extension VxStringExtension on String {
/// '123abc'.isNumber(); // false
/// ```
bool isNumber() {
final isMatch = RegExp("[0-9]").hasMatch(this);
final isMatch = RegExp(r'^-?\d*\.?\d+$').hasMatch(this);
return isMatch;
}

Expand Down

0 comments on commit 57ae963

Please sign in to comment.