jQuery-Validation-Engine icon indicating copy to clipboard operation
jQuery-Validation-Engine copied to clipboard

cdn

Open liuanxin opened this issue 6 years ago • 6 comments

Don't consider putting 3.1.0 on cdn?

Now the latest 2.6.4 version on cdn, there is a problem with the latest 3.4.1 version of jquery

jquery version validation-engine version status
>= 3.3.0 2.6.4 has problems
<= 3.2.1 2.6.4 good

liuanxin avatar Aug 30 '19 07:08 liuanxin

I created a MR on cdnjs and waiting to be merged. Than the latest version of jquery-validation-engine will be available on cdnjs.

https://github.com/cdnjs/cdnjs/pull/13439

dennybrandes avatar Aug 30 '19 10:08 dennybrandes

can you tell me the problem with latest jquery version and 2.6.4?

dennybrandes avatar Aug 30 '19 10:08 dennybrandes

In addition, after I added the following style, a single error prompt will be output to a line(as in the above figure, * Not a valid and integer are output in two lines).

.formError { white-space: nowrap; }

In this way, the position on the upper right is consistent every time the request is made. If not, the first validate error will be slightly lower, then click on the animation to move the prompt.

Of course, I am not sure if this is intentional

liuanxin avatar Sep 03 '19 08:09 liuanxin

jquery 3.4.1: https://liuanxin.github.io/version/3.4.1.html fail jquery 3.2.1: https://liuanxin.github.io/version/3.2.1.html success

$.validationEngine.defaults.scroll = false and $form.validationEngine('validate', { scroll: false }) are not in effect in query 3.2.1, { promptPosition : "topLeft" } is also, can only be used on each attribute data-prompt-position="topLeft"

It seems that the generation point of the error prompt has a problem when getting the position. The same problem is also found in the datetimepicker. The location goes to the top of the page.

@dennybrandes

liuanxin avatar Sep 16 '19 10:09 liuanxin

I tried you links but i can't see any error. Prompt is on correct position. Where can i see the bug exactly?

dennybrandes avatar Sep 19 '19 14:09 dennybrandes

I'm sorry, I did not express clearly

I modified the code to the following

var flag = $form.validationEngine('validate', { promptPosition: "topLeft", scroll: false });
if (!flag) {
    return;
}

The final error message is still in the default position(topRight). If I want to make the error appear on the topLeft, I have to use data-prompt-position="topLeft" on each form element. image


In addition, if the first error is not in the visible area, scroll: false will not take effect, and it will still scroll. Of course, this does not take effect when validate

liuanxin avatar Sep 21 '19 05:09 liuanxin