Hello,
I am trying to validate email address in TextEditor by using regular expression but the result is not same as in online regexp tester and I don’t know why. I tried email address abc.abc@abc and it passed validation in TextEditor but in online regexp tester didn’t. I tried it in multiple online reqexp testers and every time the email address didn’t pass the validation which is correct. Another problem is when I type in bigger quantity of numbers e.g. ‘12345678912345679132456798134567981345665456476545648967564’ the page will freeze.
There is my code:
@(Html.Infragistics()
.TextEditor()
.ID("test")
.ValidatorOptions(options => options.OnBlur(true).RegExp(@"[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?"))
.Render()
)
Thank you
Hello Adam Kopriva,
Please let us know if you have any other questions or concerns about this and we will be glad to help you.
Hi Adam,
It's best to double check your regEx into any browser console. Simply
var v = new RegExp("[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?");v.test("abc.abc@abc")
If the last line returns true (which is the case) then the input is valid. That's similar to the validation into our widget. We rely on javascript RegExp, so if your input is valid due to their implementation, our validator won't fail.
Thanks,
I have created a support case for you with an ID of CAS-143587-J2M0T3. The matter has been determined to be a development issue and has been logged in our tracking system with ID: 181306.
I will leave this case open and update you with any new information. You can view the status of the development issue connected to this case by going to the “Account” tab on our website, selecting "My Support Activity" and then this support case will be listed there. Then, you may select the "Development Issues" tab to view details of this development issue.
Please let me know if you have any questions.
Dear Adam Kopriva,
Thank you for posting in our forums!
I am able to reproduce these issues and I need a little more time to look into this.
I will have another update for you by Thursday.