Questions tagged [validate.js]

Questions about validate.js, a JavaScript library containing several useful functions for validating Objects.

Validate.js is currently in version 0.10.0.
It contains 3 main functions:

validate(attributes, constraints[, options])
async(attributes, constraints[, options])
single(value, constraints[, options])

All of these are very similar, but their differences are as follows:

  • validate is the basic function.
  • async starts a new thread, returning an object that resolves itself when the validation completes.
  • single evaluates a single value without the required overhead of an object literal.

See also:

23 questions
0
votes
1 answer

How to submit data after validate.js by using php?

I have a problem with submitting data with php after validate.js, I have tried a lot but I have failed. please look at the code below. Here is the example HTML form.
0
votes
1 answer

validate js not work, Uncaught ReferenceError: validate is not defined

Sorry, I know that the questions like this have been asked several times, but for my side, I have failed to overcome an error, as it's my first time to use validate.js. below here is the error and then validate.js and then html form. This is the…
0
votes
0 answers

How can i have greaterThan and equalTo in validation for the same string?

I am using validate.js to check the dates. I want end date to be equal to or greater than start date. how do I check this using jquery? Can I have two rules to the above jquery? $("#edate").rules("add", { greaterThan: "#sdate", messages: { …
dmk
  • 13
  • 1
  • 6
0
votes
0 answers

"Field is undefined" error with text input

I am using react native and to validate my inputs I am using validate.js, I used the code from this https://medium.com/@pavsidhu/validating-forms-in-react-native-7adc625c49cf and wired it up in my inputs using onChangeText and storing it in the…
Perniferous
  • 513
  • 6
  • 19
0
votes
1 answer

Validate.js, how to override private method in typescript module

I'd like to use Validate.js plugin in my Typescript project. The problem is that Validate.js has method collectFormValues: function (form, options) with hardcoded selector for input fields and it is "name" attribute. I need to use data attr for…
0
votes
1 answer

ajax form submit button ignores validation

So i have a pretty basic account registration form. Submitting the form works fine, so does the validation of the input fields. What doesn't work, is preventing the submit when an input is not correct.
K DB
  • 3
  • 4
0
votes
0 answers

Client side Custom Validation with data annotations (MVC)

I'm writing custom validator attribute in asp.net mvc, Its working fine for server side validation. Here's demo code public class CustomEmailValidator : ValidationAttribute,IClientValidatable { protected override ValidationResult IsValid(object…
0
votes
0 answers

Validation fails in tinyMCE editor

I am trying to implement Jquery Validate.js in my Create n Edit page. Validation works fine in my create page but when it comes to edit page the real problem arises. If i try to check title field first for validation then the validation works but if…
1
2