Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Client side validation #906


User avatar
0
giel83 created

Hi,

I'm trying to implement some client side validation, but I can't get it to work. I also added the unobtrusive libraries and did rebinding after AJAX calls (like this: <a class="postlink" href="https://xhalent.wordpress.com/2011/01/24/applying-unobtrusive-validation-to-dynamic-content/">https://xhalent.wordpress.com/2011/01/2 ... c-content/</a>)

But under no circumstances am I able to get it to work, and I have tried a lot of things now.

My HTML elements look OK: <input class="form-control text-box single-line" data-val="true" data-val-length="The field Description must be a string with a maximum length of 255." data-val-length-max="255" data-val-required="The Description field is required." id="Assignments_2__Description" name="Assignments[2].Description" required="required" type="text" value=""> <span class="field-validation-valid text-danger" data-valmsg-for="Assignments[2].Description" data-valmsg-replace="true"></span>

This is generated by the Html.EditorFor helper.

What is the solution / best practice to enable client side validation in abp?


2 Answer(s)
  • User Avatar
    0
    giel83 created

    Anyone? Still struggling with this issue....

  • User Avatar
    0
    hikalkan created
    Support Team

    Hi,

    Actually, there is no special thing for ABP. It's a general concept. Maybe you didn't add related javascript libraries to your project.