Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude :submit from validation #144

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

mark-31
Copy link

@mark-31 mark-31 commented Feb 20, 2017

Element :submit does not contain validation rules.

  • bug fix? yes
  • new feature? no
  • BC break? no

Element :submit does not contain validation rules.
@dg
Copy link
Member

dg commented Feb 20, 2017

Which bug it fixes?

@mark-31
Copy link
Author

mark-31 commented Feb 20, 2017

nette-live-form-validation + Bootstrap 3 + .input-group with submit button.
IMHO validation on submit is useless.

@dg
Copy link
Member

dg commented Feb 20, 2017

Where exactly is problem? Any side effect?

@mark-31
Copy link
Author

mark-31 commented Feb 20, 2017

Example:

<div class="form-group">
   <div class="input-group">
      {input login-password, class => 'form-control'}
      <div class="input-group-btn">
         <button n:name="submitter-signin" class="btn btn-primary no-live-validation" type="submit">
            <i class="fa fa-sign-in"></i>
         </button>
      </div>
   </div>
</div>

Class .form-group is parental element for 2 controls.
If input:text is empty, parental element has to have class .has-error, but result is adverse, because the submitter is always positive.

@Robyer
Copy link

Robyer commented Mar 4, 2017

@dg This PR was originally posted for nette-live-form-validation script ( contributte/live-form-validation#30 ).

Is there a reason why submit is not ignored (as this PR proposes)? Or you don't want to merge this just because it doesn't make any real change for netteForms.js itself? I haven't used nette for a while so I can't really tell what side-effects this could cause (if any).

@dg dg force-pushed the master branch 2 times, most recently from 571b36c to 841e5de Compare March 29, 2017 16:48
@dg
Copy link
Member

dg commented Jun 21, 2017

I understand what the problem is. The same thing can happen if two inputs are together in one form-group, so a better solution is the error state only to turn on, not to turn off.

@dg dg force-pushed the master branch 4 times, most recently from 49c38f3 to c6f98c1 Compare April 1, 2024 01:05
@dg dg force-pushed the master branch 4 times, most recently from 337f707 to 2146e59 Compare May 2, 2024 10:56
@dg dg force-pushed the master branch 6 times, most recently from 94f43f0 to fe374c5 Compare May 12, 2024 13:07
@dg dg force-pushed the master branch 7 times, most recently from cb844f0 to 1d8a434 Compare August 8, 2024 14:36
@dg dg force-pushed the master branch 2 times, most recently from 479185b to 8da5796 Compare October 22, 2024 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants