Nicklas Ansman
Nicklas Ansman
Ok, this does not directly solve your problem but in 8b07b877882361c026ba01ae473ce4b417a6a345 `presence` no longer allows empty strings, arrays etc per default. All other validators will still treat empty strings as...
The easiest would probably be to define a custom validator that either delegates to `format` or validates itself.
i18n is definitely something that is lacking in this library. What you describe is already possible actually. All included validators support overwriting the default options. So you could do this:...
@jakubrohleder I would recommend that you describe your solution before implementing it in case it is in another direction than the library is heading. This could potentially be added in...
@airtonix Technically validate.js already supports this but some things could be nicer. The whole idea of prefixing the message with the attribute name needs to be rethought if translations should...
@airtonix Exactly, validate.js shouldn't support i18n in itself but it should make it easy to implement.
Hmm, I'd rather see that you specify a constraint for each element
@huan086 I feel like validate.js should a global setting wether to consider empty string, arrays and objects empty or not. Ideally `presence` should capture everything that the other validators lets...
Why is this a problem? It's only used for the tests
This seems part of the HTML 5 form validation, check MDN for this