Comments (14)
you may add as many validation conditions as required for a given field. validations are evaluated left to right.
So you could for instance have a validation such as
validate[customer[number],funcCall[myMethod]]
There are two validations in the code above but you may have more
from jquery-validation-engine.
Ok, however something like I've tried ;)
customer is function?
When I write for example this: class="validate[custom[number],min[1],funcCall[fields]]",
The first two options works, but funcCall stops working.
from jquery-validation-engine.
what is "fields" in your example above ?
fields should be a javascript function defined in the and with the following signature
function fields(field, rules, i, options) {
from jquery-validation-engine.
Yes, exactly as the demo.
function fields(field, rules, i, options) {..
optional,funcCall[..] - it separately works
from jquery-validation-engine.
I would be very surprise if the issue was on our side, but.. we never know.
could you prepare a unit test and send it? I will look into it
from jquery-validation-engine.
What is unit test?
from jquery-validation-engine.
http://en.wikipedia.org/wiki/Unit_test
from jquery-validation-engine.
It works fine, and here is how to validate it.
Open demoValidators.html, line 129 : replace
by
<input value="" class="validate[required,custom[number],funcCall[checkHELLO]] text-input" type="text" id="lastname" name="lastname" />
now double click the HTML file, enter "a" in the appropriate field.
-> the label comes back as
- Invalid floating decimal number
- Please input HELLO
from jquery-validation-engine.
NO it's not working well, If I write HELLO, its write message: Invalid floating decimal number!
But it's not my problem.
Pls, read my first question again...
My problem is optional parameter, or
--At least one field is required--
validation. !!
Problem is that, if I tried: validate[optional,custom[number],funcCall[field1_or_field2_or_field3]](what you've indirectly advised) it works in demo fine, but on my web isn't. ;) And I don't know where I have something else...;)
from jquery-validation-engine.
Sorry I have problems reading your english.
I am still trying to understand your messages.
If it works in the demo and not in your code, then it's an issue with your code. Without unit test or at least extracts from your code, it is really hard to guess the issues you may have created.
NO it's not working well, If I write HELLO, its write message: Invalid floating decimal number! -> of course, it's a customer[number] validation.
I would recommend to look at the browser's java console to identify the issue - sorry it's not on our side.
Sincerely,
from jquery-validation-engine.
Sorry for my english, but I thought that you understand me..
But I don't understand to this: of course, it's a customer[number] validation. ??
Do you think this is due to the application of validation number to text? then I understand. ;) Ok,I will find what I have wrong.
from jquery-validation-engine.
ok the field validation is
It checks,
- that the field is filled with something
- that it's a number
- finally the chechkHello validates that the string equals "HELLO"
right there you can see that it is impossible to pass this test, obviously a number (test2) can't be equal to "HELLO" (test3)
But it proves that there is nothing wrong with the validations, they work as designed.
from jquery-validation-engine.
:DD I understand.
But this is not my problem...
from jquery-validation-engine.
Please reformulate your problem, I read it 20 times - I don't get it
from jquery-validation-engine.
Related Issues (20)
- <input type="number" class="validate[custom[number]]"/>时,谷歌,火狐浏览器验证value为"1..55"这样的多个点时,验证失效,IE下验证OK HOT 2
- Vue.js conditional rendering HOT 1
- Add Issue template and Pull request template
- (hide) hiding all error prompts?! HOT 1
- [QUESTION] Where I can find the CI service? HOT 2
- Jquery validation engine not working with Jquery 3.4.1 HOT 4
- Starting pre release 3.0.0 HOT 2
- X-Requested-With: XMLHttpRequest is not transmit in v3.0 HOT 2
- is there a way to upload a file on the form ajax call ? HOT 4
- Support ipv6 in custom regex HOT 1
- cdn HOT 6
- Select Date & Validate
- Incompatible date format in some locales with 'future'
- Position Left issue
- GHSL-2020-354: seeking security contact for your project
- promptPosition dont work HOT 1
- Documentation
- Trying to get in touch regarding a security issue
- About Bug or duplicate Javascript code line HOT 1
- Can't show error message
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jquery-validation-engine.