Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
505
How to use a textEditor with validation?
posted

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?


Parents
  • 24497
    Suggested Answer
    posted

    Hi,

    The validator requires 1 css and 1 js file. For versions 11.2 and lower those are

    ig.ui.validator.css
    ig.ui.validator.js

    and for versions 12.1 and higher those are 

    infragistics.ui.validator.css
    infragistics.ui.validator.js

Reply Children