unoplatform/Uno.Core

[Uno.Core] ValidationHelper.IsEmail returns valid for x@x.x while it's not.

alexvlaar opened this issue · 1 comments

Current behavior

x@x.x is returned as valid by the validation helper.
Method documentation indicates it should validate minimum format of x@x.xx

Expected behavior

x@x.x is returned as invalid

How to reproduce it (as minimally and precisely as possible)

var isValid = ValidationHelper.IsEmail("x@x.x");

Environment

Nuget Package:

Package Version(s): 1.29.0-dev.93

Affected platform(s):
Probably all.

  • iOS
  • Android
  • WebAssembly
  • WebAssembly renderers for Xamarin.Forms
  • Windows
  • Build tasks
  • Solution Templates

Visual Studio:

  • 2017 (version: )
  • 2019 (version: )
  • for Mac (version: )

Relevant plugins:

  • Resharper (version: )

Anything else we need to know?

Looks like we're missing unit tests for this:

@"\A(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)\Z",

Those should help: #62

@alexvlaar could you add you test in this branch ?