Uno.Core icon indicating copy to clipboard operation
Uno.Core copied to clipboard

[Uno.Core] ValidationHelper.IsEmail returns valid for [email protected] while it's not.

Open alexvlaar opened this issue 5 years ago • 1 comments

Current behavior

[email protected] is returned as valid by the validation helper. Method documentation indicates it should validate minimum format of [email protected]

Expected behavior

[email protected] is returned as invalid

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

var isValid = ValidationHelper.IsEmail("[email protected]");

Environment

Nuget Package:

Package Version(s): 1.29.0-dev.93

Affected platform(s): Probably all.

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

Visual Studio:

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

Relevant plugins:

  • [ ] Resharper (version: )

Anything else we need to know?

alexvlaar avatar Oct 30 '19 13:10 alexvlaar

Looks like we're missing unit tests for this:

https://github.com/unoplatform/Uno.Core/blob/ab0253ae18621647e3ceac397942c20faa9a0812/src/Uno.Core/Validation/ValidationHelper.cs#L284

Those should help: https://github.com/unoplatform/Uno.Core/pull/62

@alexvlaar could you add you test in this branch ?

jeromelaban avatar Oct 30 '19 16:10 jeromelaban