Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8980443
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T20:05:23+00:00 2026-06-15T20:05:23+00:00

I’m not quite sure if I understood how to use the validation plugin of

  • 0

I’m not quite sure if I understood how to use the validation plugin of jquery. I tried the validation for one input field (set it to required and minimum length to 1). Then I’ve tried to submit the form without entering any value into the input field, but it did not prevent me from submitting it.

My jQuery code looks like this:

$(document).ready(function() {
    // ... other non relevant code ...

    $("#organisationsantrag").validate({
        rules: {
            ouKostenstelle: {
                required: true,
                minlength: 1
            }
        },
        messages: {
            ouKostenstelle: {
                required: "Nothing entered",
                minlength: "Too short"
            }
        }
    })
})

This is what the part of the HTML looks like (since it’s generated, it doesn’t look very pretty):

<table>
    <tr>
        <td>
            <FORM NAME="formAbschicken" METHOD="POST" ACTION='http://target' ID="organisationsantrag">
                <table BORDER="0">
                    <tr>
                        <td COLSPAN="2"><HR width="100%"></td>
                    </tr>
                    <tr>
                        <td>Antragsteller</td>
                        <td><INPUT TYPE="TEXT" NAME="cnAntragsteller" ID="cnAntragsteller"  VALUE=""></td>
                    </tr>
                    <tr>
                        <td COLSPAN="2"><HR width="100%" class="trennlinie"></td>
                    </tr>
                    <tr>
                        <td><P CLASS="ouName">Name der OE</P></td>    
                        <td><INPUT TYPE="TEXT" NAME="ouName" CLASS="ouName" ID="ouName" READONLY="READONLY"  VALUE=""></td>    
                    </tr>
                    <tr>
                        <td><P CLASS="ouNummer">Betrieb</P></td>    
                        <td><INPUT TYPE="TEXT" NAME="ouNummer" CLASS="ouNummer" ID="ouNummer" READONLY="READONLY"  VALUE=""></td>    
                    </tr>
                    <tr>
                        <td><P CLASS="ouKostenstelle">Kostenstelle</P></td>
                        <td><INPUT TYPE="TEXT" NAME="ouKostenstelle" CLASS="ouKostenstelle" ID="ouKostenstelle"  VALUE=""></td>    
                    </tr>
                    <tr>
                        <td COLSPAN="2"><HR width="100%" class="trennlinie"></td>
                    </tr>
                    <tr>
                        <td><P CLASS="jbdAntragsteller">Bezeichnung der Funktion</P></td>
                        <td><INPUT TYPE="TEXT" NAME="jbdAntragsteller" CLASS="jbdAntragsteller" ID="jbdAntragsteller" READONLY="READONLY"  VALUE=""></td>    
                    </tr>
                    <tr>
                        <td><P CLASS="jbAntragsteller">Planstellen-Nr.</P></td>    
                        <td><INPUT TYPE="TEXT" NAME="jbAntragsteller" CLASS="jbAntragsteller" ID="jbAntragsteller" READONLY="READONLY"  VALUE=""></td>    
                    </tr>
                    <tr>
                        <td><P CLASS="ccAntragsteller">Kostenstelle</P></td>
                        <td><INPUT TYPE="TEXT" NAME="ccAntragsteller" CLASS="ccAntragsteller" ID="ccAntragsteller" READONLY="READONLY"  VALUE=""></td>    
                    </tr>
                    <tr>
                        <td><P CLASS="pnAntragsteller">Personalnummer</P></td>
                        <td><INPUT TYPE="TEXT" NAME="pnAntragsteller" CLASS="pnAntragsteller" ID="pnAntragsteller" READONLY="READONLY"  VALUE=""></td>
                    </tr>
                    <tr>
                        <td><P CLASS="cnLeiter">Übergeordneter Leiter</P></td>
                        <td><INPUT TYPE="TEXT" NAME="cnLeiter" CLASS="cnLeiter" ID="cnLeiter" READONLY="READONLY"  VALUE=""></td>
                    </tr>
                    <tr>
                        <td COLSPAN="2"><HR width="100%"></td>
                    </tr>
                    <tr>
                        <td>Visiert durch</td>
                        <td><INPUT TYPE="TEXT" NAME="cnVisum" ID="cnVisum" READONLY="READONLY"  VALUE="Current User"></td>
                    </tr>
                    <tr>
                        <td><P CLASS="directors">Managing Director</P></td>    
                        <td><select name="directors" size="0" CLASS="directors" ID="directors" ></select></td>    
                    </tr>
                    <tr></tr>    
                    <tr>
                        <td></td>    
                        <td><INPUT  TYPE="SUBMIT" NAME="Submit" VALUE="Submit"></td>    
                    </tr>
                </table>
            </FORM>
        </td>
    </tr>
</table>

I’m not getting any errors. That’s why I think I didn’t get the syntax of the validation method.

Update: I have no idea why, but it’s working after I’ve made some changes in other parts of jquery. Also I’ve placed the form validation part, at the beginning of the script tag.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T20:05:24+00:00Added an answer on June 15, 2026 at 8:05 pm

    Better late than never.

    Problem was related to the position where I’ve placed the code. Since I used a Workflow-Tool which had one template for all sites, I couldn’t place the javascript in the templates head section. I had to place it within a td of the table.

    If the code was placed before the actual inputs appeared, it wouldn’t work, placing it after the elements did do the trick.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am reading a book about Javascript and jQuery and using one of the
I'm not entirely sure how I managed to jack this up. http://pretty-senshi.com If you
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have just tried to save a simple *.rtf file with some websites and
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
I have a small JavaScript validation script that validates inputs based on Regex. I
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I need a function that will clean a strings' special characters. I do NOT

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.