Hello,
I am creating an Asp.net MVC web site. I am going to use the text box with validation.
Here is my code in .cshtml file,
@(Html.Infragistics().TextEditor() .ID("textEditor") .Width(160) .Required(true) .ValidatorOptions(m => m.OnSubmit(false).OnChange(true).OnBlur(true).ShowIcon(true)) .Render())
the text box border will be red it lost focus without typing nothing, but no message pop up, also a error occurred, it says: expr.replace is not a function
It seems I didn't include js correcly, is anyone know which component I should include?
Hi,
The validator requires 1 css and 1 js file. For versions 11.2 and lower those are
ig.ui.validator.cssig.ui.validator.js
and for versions 12.1 and higher those are
infragistics.ui.validator.cssinfragistics.ui.validator.js
It still has an error said "expr.replace is not a function", I am not sure why?
Hi Viktor Snezhko,
Thanks for your answer, I am using versions 12.1, I included the files you listed, I need to set the textEditor as required, right now if I leave the textEditor ampty, its border changed to red, what I want is pop up a message tell user this field is required and if this field is empty user cannot post the div which this textEditor in. What should I do? Should I write some code in javascript?