Questions tagged [client-side-validation]

If the user is working with a browser that supports dynamic HTML (DHTML), Validation can perform validation using client script. It can provide immediate feedback without a round trip to the server

512 questions
11
votes
3 answers

fluent validation with when on client side

In a ASP.NET MVC4 application we are using FluentValidation for validating our models. In certain cases we only want to validate a property when another property has a value. We use the When keyword to accomplish this. A simple validation class…
10
votes
1 answer

jQuery email validation requirements

I'm using the jQuery.Validation plugin for client side validation, and among other things I validate email addresses. Now I also want to validate on the server side (for users without javascript etc). For lack of better ideas I started on a regex,…
Tomas Aschan
  • 58,548
  • 56
  • 243
  • 402
10
votes
9 answers

How to trigger active form validation manually before submit?

Is it possible to call the active form validation programmatically via JavaScript? I need to call the validation procedure before doing some ajax operations.
AleCat83
  • 1,443
  • 3
  • 22
  • 41
9
votes
3 answers

DDD & client-side validation

Suppose you have an application that utilizes the domain-model pattern, DDD and lots of other design patterns. assume that we have a number of solutions as listed…
9
votes
2 answers

Clientside validation using Xforms - MVC application

I am trying to perform a client side form validation using an episerver xform the compiled html looks like this: http://codepen.io/anon/pen/ojGGJw Any guidance on how to achieve that? I am thinking about using .validate library but I will have an…
IndieTech Solutions
  • 2,527
  • 1
  • 21
  • 36
9
votes
3 answers

So is it safe to validate form on client-side only?

Of course, I know that server-side validation is a MUST. I'm using jQuery to validate form inputs and using jquery ajax to do server-side(PHP) validation at the same time. So I guess it may be safe since it's validating for both sides while…
8
votes
0 answers

Can we stop Vue from performing Client Side Hydration for a specific component?

I am fairly new to Vue and we are facing a problem where the total DOM size for our page has increased because we are storing a lot of data in DOM config for Vue client side hydration. For SEO purposes, we can't skip on server-side rendering. I was…
Vedang Sharma
  • 206
  • 2
  • 7
8
votes
4 answers

MVC2 Client-side validation for a DateTime?

What approach do you recommend for validating a DateTime on the client side in MVC? Let's say I have a model with a property named DateOfBirth that is a DateTime, like so. public class UserModel { [DataType(DataType.Date)] public DateTime…
8
votes
2 answers

What can be causing Html.ValidateFor() method to produce a compile error?

I have view with the following which works: <%= Html.TextBoxFor(m => m.FirstName, new { @class = "required_field_light" }) %> <%= Html.ValidationMessageFor(m => m.FirstName) %> However, if I change the ValidationMessageFor() to a ValidateFor() like…
Sailing Judo
  • 11,083
  • 20
  • 66
  • 97
8
votes
2 answers

How to check if user already exists on client-side in ASP.NET MVC 5?

Using Visual Studio 2013.4 (Visual Studio 2013 Update 4) I have created a regular ASP.NET MVC 5 project with Individual User Accounts authentication configuration. All the users registration and log-in features has been already scaffolded for me by…
Deilan
  • 4,740
  • 3
  • 39
  • 52
8
votes
1 answer

jQuery.Validation.Unobtrusive client side validation only works when scripts are on view page

I have an ASP.NET MVC 4 App that uses the jQuery.validation.js plugin and MVC's jQuery.validation.unobtrusive.js. I use data annotations on my view model to validate a textbox's input to be an integer. This (nested) view is loaded within a parent…
7
votes
3 answers

ASP.NET MVC ValidationAttribute Get Other Property Display Name

I have created a custom CompareLessThan validation attribute by copying the ASP.NET MVC 3 CompareAttribute and instead of checking for equality, I check to see that one property is less than another. If there is a client side error, the message '{0}…
7
votes
8 answers

Why do we need server side as well as client side validation for Web applications?

Is there any high level reason to have both client side and server side validations for a web application ?
Puru
  • 8,913
  • 26
  • 70
  • 91
7
votes
3 answers

SimpleForm+ClientSideValidations+bootstrap - Validation is not occuring on the form- all inputs are accepted

I am using the SimpleForm, ClientSideValidations, and ClientSideValidations-SimpleForm gems in a RoR application. I can render the form into the modal beautifully, however when the input loses focus no validation occurs and the form is submitted.…
7
votes
2 answers

jquery multi step form validation

I need to validate a multi-step form. Are there any decent plugins for doing this? For example: $(function() { $('#MoveStep1').click(function() { $("#step1").validate(); }); }); #step1 is a field set.
john
1
2
3
34 35