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 8371029
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T14:03:49+00:00 2026-06-09T14:03:49+00:00

I am not trying to get to fancy with my client side validation this

  • 0

I am not trying to get to fancy with my client side validation this go round. Maybe for a future project, but I just want some basic form validation for my forms…

I know you can link the stuff to your model or whatever, but I really just want to display an error message to the client if his entry isn’t correct. However, I am having a hard time getting any validation at all to work. So I am guess I am missing something rather simple. I thought I had all my bases covered, but apparently not.

Here are the scripts that I included into my project and onto the view…

<script src="../../Scripts/jquery.validate.js" type="text/javascript"></script>
<script src="../../Scripts/jquery.validate.unobtrusive.js" type="text/javascript"></script>
<script src="../../Scripts/jquery.maskedinput-1.3.min.js" type="text/javascript"></script>

I don’t think there is an error because the masked input is working… But I really should open up my debugger to make sure. I will as soon as I am done with this post.

Here is where I am doing some general validation…

$("eEncId").validate({
            rules: {DateOfBirth: {
                    required: true
                }
}
})

The form seems to submit whether or not I have a DateOfBirth…
What am I missing?

UPDATE: Posting html output…

<form action="/EditEncounter/Save?popid=2" id="eEncId" method="post"><label for="Active">Deactivate</label><input id="Active" name="Active" type="radio" value="N" /><input data-val="true" data-val-number="The field EncounterId must be a number." data-val-required="The EncounterId field is required." id="EncounterId" name="EncounterId" type="hidden" value="1898" /><input data-val="true" data-val-number="The field EMPIID must be a number." data-val-required="The EMPIID field is required." id="EMPIID" name="EMPIID" type="hidden" value="0" /><input data-val="true" data-val-number="The field PatientId must be a number." data-val-required="The PatientId field is required." id="PatientId" name="PatientId" type="hidden" value="4433" />    <table width="500" class="odd">
        <tr><td>
            <label for="FirstName">FirstName</label> 
            </td>
            <td><input Value="RAYFIELD" id="FirstName" name="FirstName" type="text" value="RAYFIELD" /></td>
        </tr>
        <tr><td>
            <label for="LastName">LastName</label>
            </td>
            <td>
            <input Value="BOYD" id="LastName" name="LastName" type="text" value="BOYD" />
            </td>
        </tr>
        <tr><td>
            <label for="DateOfBirth">DateOfBirth</label>
            </td>
            <td>
            <input Value="03/06/1947 00:00:00" data-val="true" data-val-date="The field DateOfBirth must be a date." id="DateOfBirth" name="DateOfBirth" type="text" value="3/6/1947 12:00:00 AM" />
        </td>
        </tr>
        <tr><td>
            <label for="Phone">Phone</label>
            </td>
            <td>
            <input Value="4124880798" id="Phone" name="Phone" type="text" value="4124880798" />
        </td></tr>
        <tr><td>
            <label for="HostpitalFinNumber">HostpitalFinNumber</label>
            </td>
            <td>
            <input Value="6669511596226" id="HostpitalFinNumber" name="HostpitalFinNumber" type="text" value="6669511596226" />
        </td></tr>
        <tr><td>
            <label for="AdminDate">AdminDate</label>
            </td>
            <td>
            <input Value="03/02/2012 00:00:00" data-val="true" data-val-date="The field AdminDate must be a date." id="AdminDate" name="AdminDate" type="text" value="3/2/2012 12:00:00 AM" />
        </td></tr>
        <tr><td>
            <label for="MRNType">MRNType</label>
            </td>
            <td>
            <input Value="MPACMRN" id="MRNType" name="MRNType" type="text" value="MPACMRN" />
        </td></tr>
        <tr><td>
            <label for="MRN">MRN</label>
            </td>
            <td>
            <input Value="785528039" id="MRN" name="MRN" type="text" value="785528039" />
        </td></tr>
        <tr><td>
            <label for="PatientRoomPhone">PatientRoomPhone</label>
            </td>
            <td>
            <input Value="" id="PatientRoomPhone" name="PatientRoomPhone" type="text" value="" />
        </td></tr>
        <tr><td>
            <label for="DischargeDateTime">DischargeDateTime</label>
            </td>
            <td>
            <input Value="01/01/0001 00:00:00" data-val="true" data-val-date="The field DischargeDateTime must be a date." id="DischargeDateTime" name="DischargeDateTime" type="text" value="1/1/0001 12:00:00 AM" />
        </td></tr>
        <tr><td>
            <label for="DischargeDisposition">DischargeDisposition</label>
            </td>
            <td>
            <input Value="" id="DischargeDisposition" name="DischargeDisposition" type="text" value="" />
        </td></tr>
        <tr><td>
            <label for="DischargeTo">DischargeTo</label>
            </td>
            <td>
            <input Value="" id="DischargeTo" name="DischargeTo" type="text" value="" />
        </td></tr>
        <tr><td>
            <label for="DischargeAdvocateCall">DischargeAdvocateCall</label>
            </td>
            <td>
            <input Value="" id="DischargeAdvocateCall" name="DischargeAdvocateCall" type="text" value="" />
        </td></tr>
        <tr><td>
            <label for="Payor">Payor</label>
            </td>
            <td>
            <input Value="" id="Payor" name="Payor" type="text" value="" />
        </td></tr>
        <tr><td>
            <label for="HomeHealthCareAccepted">HomeHealthCareAccepted</label>
            </td>
            <td>
            <input Value="" id="HomeHealthCareAccepted" name="HomeHealthCareAccepted" type="text" value="" />
        </td></tr>
        <tr><td>
            <label for="SafeLandingAccepted">SafeLandingAccepted</label>
            </td><td>
            <input Value="" id="SafeLandingAccepted" name="SafeLandingAccepted" type="text" value="" />
        </td></tr>
        <tr><td>
            <label for="PCPName">PCPName</label>
            </td><td>
            <input Value="Dr. Peggy Halsey" id="PCPName" name="PCPName" type="text" value="Dr. Peggy Halsey" />
        </td></tr>
        <tr><td>
            <label for="PCPPhone">PCPPhone</label>
            </td><td>
            <input Value="4126244141" id="PCPPhone" name="PCPPhone" type="text" value="4126244141" />
        </td></tr>
        <tr><td>    
            <label for="SpecialistName">SpecialistName</label>
            </td><td>
            <input Value="" id="SpecialistName" name="SpecialistName" type="text" value="" />
        </td></tr>
        <tr><td>
            <label for="SpecialistPhone">SpecialistPhone</label>
            </td><td>
            <input Value="" id="SpecialistPhone" name="SpecialistPhone" type="text" value="" />
        </td></tr>
        <tr><td>
            <label for="PCPAppointmentDateTime">PCPAppointmentDateTime</label>
            </td><td>
            <input Value="01/01/0001 00:00:00" data-val="true" data-val-date="The field PCPAppointmentDateTime must be a date." id="PCPAppointmentDateTime" name="PCPAppointmentDateTime" type="text" value="1/1/0001 12:00:00 AM" />
        </td></tr>
        <tr><td>
            <label for="PCPAppointmentLocation">PCPAppointmentLocation</label>
            </td><td>
            <input Value="" id="PCPAppointmentLocation" name="PCPAppointmentLocation" type="text" value="" />
        </td></tr>
        <tr><td>
            <label for="SpecialistAppointmentDateTime">SpecialistAppointmentDateTime</label>
            </td><td>
            <input Value="01/01/0001 00:00:00" data-val="true" data-val-date="The field SpecialistAppointmentDateTime must be a date." id="SpecialistAppointmentDateTime" name="SpecialistAppointmentDateTime" type="text" value="1/1/0001 12:00:00 AM" />
        </td></tr>
        <tr><td>
            <label for="SpecialistAppointmentLocation">SpecialistAppointmentLocation</label>
            </td><td>
            <input Value="" id="SpecialistAppointmentLocation" name="SpecialistAppointmentLocation" type="text" value="" />
        </td></tr>
        <tr><td>
            <label for="CompletedPathway">CompletedPathway</label>
            </td><td>
            <input Value="1" id="CompletedPathway" name="CompletedPathway" type="text" value="1" />
        </td></tr>
        <tr><td>
            <label for="CompletedPathwayReason">CompletedPathwayReason</label>
            </td><td>
            <input Value="" id="CompletedPathwayReason" name="CompletedPathwayReason" type="text" value="" />
        </td></tr>
        <tr><td>
            <label for="Comment">Comment</label>
            </td><td>
            <textarea Value="" cols="20" id="Comment" name="Comment" rows="2">
</textarea>
        </td></tr>
    </table>
    <p>
    <input type="submit" value="Save" class="button" id="btClick"/>
    </p> 
</form>

I checked the Id’s of the appropriate fields, and everything seems to check out. Very mysterious.

  • 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-09T14:03:50+00:00Added an answer on June 9, 2026 at 2:03 pm

    I think you missing the # from the ID in your code block try this:

    $("#eEncId").validate({
                rules: {DateOfBirth: {
                        required: true
                    }
        }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im trying to get this working but for some reason it's just not right.
I am trying to get just the select element and not its options. When
I'm trying to get Thinking Sphinx running on my site but I'm not sure
I am not a .Net guy but trying to get update an existing .net
I am trying to get all the rows that exist in allData but not
I may be trying to get too fancy on this one. I have a
IM trying to get the div content not to flow past the footer, I
I'm trying to get a list in JavaScript (not using jQuery) of all the
Im trying to get the mysql_insert_id using PDO. Thus far i've not found a
While trying to GET a JSON, my callback function is NOT firing. $.ajax({ type:GET,

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.