Giter Club home page Giter Club logo

Comments (12)

orefalo avatar orefalo commented on July 23, 2024

Could you please reformulate ? are you reporting a bug or a suggestion ?
Please explain in proper english.

Thank you.

from jquery-validation-engine.

simpleobservations avatar simpleobservations commented on July 23, 2024

Feature request.

I would like a flag, showArrow, in the options object passed to actions. This would do the same thing that the similarly named flag in showPrompt does.

It would be nice if changing away from the default prompt position didn't cause the arrow that is pointing towards an erroneous field entry to go away.

e.g. When you specify no promptPosition you get the prompt above the field with an arrow pointing at the field. However, once you change the position to let say centerRight, you lose the arrow pointing towards the field.

Arrow:
jQuery('#adminForm').validationEngine('init');
No Arrow:
jQuery('#adminForm').validationEngine('init',{promptPosition : "centerRight", scroll: false});

Apologies if I have missed the option that allows this. I see it for showPrompt but none of the action options.

from jquery-validation-engine.

orefalo avatar orefalo commented on July 23, 2024

got it.. looks like a bug to me.
Will try to reproduce the error before the end of the week.

from jquery-validation-engine.

orefalo avatar orefalo commented on July 23, 2024

haven't had time to work on this one, sorry. will look into it once I can free up some time.

from jquery-validation-engine.

dskilken avatar dskilken commented on July 23, 2024

I could not get the arrows to appear on any of the error messages with this new version until I changed line 140 back to:

        if(!promptPosition)
            options.promptPosition=promptPosition;
        options.showArrow = showArrow===true;

I think there may be a bug in the new version that impairs the showing of arrows. I am not sure of all your logic in this section. I found it by comparing it with version 2.0 which did have the arrows. I may not be specifying the arrows properly, as I was relying on the default of showing an arrow. I also am a bit worried about the lack of brackets {} around the logic intended to be executed by the if statement. Seems it could be ambiguous as to what would be done if the statement is true.

There may also be a bug in closing the error prompt when you change the state of a select or radio button after validation when the user has forgotten these form values. I put an onclick action on these form elements to close the error message to work around this.

Sometimes I have to put special on-submit conditions to check the combobox entries because they will cause the error prompt to come up, but not prevent form entry.

I want to thank you...you have, by far, the finest form validation for jQuery available on the web. Your solution should be the standard in the jQueryIU site. It looks better, works better, and is better documented. Please see it in action on www.tripinsurance.com. I have integrated it with datepicker, combobox, and field masking, and it works great...

from jquery-validation-engine.

posabsolute avatar posabsolute commented on July 23, 2024

Yea I saw some inconsistencies in the ajax part as far as showarrow is concern (where it was not showing and should), we might have to think about rewriting this part.

from jquery-validation-engine.

dskilken avatar dskilken commented on July 23, 2024

I also noticed that Combobox and Select in the jQueryUI library really cause problems with the Validation Engine. I had to use on submit routines and show prompt to verify these components by hand.
thanks,
Dan

On Jun 27, 2011, at 6:22 AM, posabsolute wrote:

Yea I saw some inconsistencies in the ajax part as far as showarrow is concern (where it was not showing and should), we might have to think about rewriting this part.

Reply to this email directly or view it on GitHub:
#67 (comment)

from jquery-validation-engine.

posabsolute avatar posabsolute commented on July 23, 2024

will try to make time to check the arrow issue

from jquery-validation-engine.

kidxrude avatar kidxrude commented on July 23, 2024

I'm missing the arrows with the centerRight option too! Thx.

from jquery-validation-engine.

TheKrush avatar TheKrush commented on July 23, 2024

I think showPrompt should actually look like this:

        showPrompt: function(promptText, type, promptPosition, showArrow) {

            var form = this.closest('form');
            var options = form.data('jqv');
            // No option, take default one
            if(!options) options = methods._saveOptions(this, options);
            if(promptPosition)
            {
                options.promptPosition=promptPosition;
                options.showArrow = showArrow==true;
            }

            methods._showPrompt(this, promptText, type, false, options);
            return this;
        },

With the showArrow code INSIDE the check to see if the user passed in the promptPosition otherwise if someone does:

.validationEngine('showPrompt', rules.required.alertText, 'error')

it would ignore the default settings and just turn off the arrow.

from jquery-validation-engine.

co-operation avatar co-operation commented on July 23, 2024

to make the confusion about arrows complete:
It's not possible to turn the arrows off, because within _validateField any preset value is overwritten:

options.showArrow = true;

https://github.com/posabsolute/jQuery-Validation-Engine/blob/master/js/jquery.validationEngine.js#L511

Would be great if a global disabling would be possible...

from jquery-validation-engine.

abraxascorner avatar abraxascorner commented on July 23, 2024

We did some changes in javascript and css to fix this (we did it only for centerRight, but it can be applicalble to other positions):
js

case "centerRight":
                        arrow.html('<div class="line2"><!-- --></div><div class="line3"><!-- --></div><div class="line4"><!-- --></div><div class="line5"><!-- --></div><div class="line6"><!-- --></div><div class="line7"><!-- --></div><div class="line8"><!-- --></div><div class="line9"><!-- --></div><div class="line10"><!-- --></div>');
                        prompt.append(arrow);
                        arrow.addClass("rightPosArrow");
                        break;

And we made space for it by changing this line:

//promptleftPosition= fieldLeft + field.outerWidth(true)  + 5;
                    promptleftPosition= fieldLeft + field.outerWidth(true) + 13;

Also, we did some changes to css:

.formError .formErrorArrow.rightPosArrow { position: absolute; top: 4px; left: -9px; margin: 0; width: 15px;}
.formError .formErrorArrow.rightPosArrow .line10 { width: 1px; height: 15px;}
.formError .formErrorArrow.rightPosArrow .line9 { height: 13px; width: 1px;}
.formError .formErrorArrow.rightPosArrow .line8 { height: 11px; width: 1px;}
.formError .formErrorArrow.rightPosArrow .line7 { height: 9px; width: 1px;}
.formError .formErrorArrow.rightPosArrow .line6 { height: 7px;}
.formError .formErrorArrow.rightPosArrow .line5 { height: 5px;}
.formError .formErrorArrow.rightPosArrow .line4 { height: 3px;}
.formError .formErrorArrow.rightPosArrow .line3 { height: 1px; border: medium none;}
.formError .formErrorArrow.rightPosArrow .line2 { height: 1px; border: medium none; }
.formError .formErrorArrow.rightPosArrow .line1 { border: medium none; height: 1px; width: 1px;}
.formError .formErrorArrow.rightPosArrow div { border-left: 0; border-right: 0; border-left: 0; border-top: 1px solid #000000; border-bottom: 1px solid #000000; display: inline-block; vertical-align: middle;  background-image:url(../images/overlay-bg.png); background-color: transparent; box-shadow: 0 0 3px #000000 !important; width: 1px !important;}, we added some css for that arrow:

Credits to my colleague Sasa.

from jquery-validation-engine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.