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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T16:38:13+00:00 2026-05-16T16:38:13+00:00

This is my HTML page.. <div> <form id=signupForm method=get action=> <table> <tr><td><input type=button value=New

  • 0

This is my HTML page..

<div>
<form id="signupForm" method="get" action="">
<table> 
  <tr><td><input type="button" value="New" onclick="clearuserfields()"/></td></tr>
 <tr><td>USERID:</td><td><input type="text" id="userID"/></td></tr>
 <tr><td>FNAME:</td><td><input type="text" id="fname" name="fname" /></td></tr>
 <tr><td>LNAME:</td><td><input type="text" id="lname" name="lname" /></td></tr>
 <tr><td>EMAIL:</td><td><input type="text" id="email" name="email" /></td></tr>
 <tr><td>PASSWORD:</td><td><input type="text" id="password" name="password" /></td></tr>
 <tr><td>PHONENO:</td><td><input type="text" id="phoneno" name="phoneno" /></td></tr>
 <tr><td>ROLL:</td><td><input type="text" id="roll" name="roll" /></td></tr>
 <td><input type="button" value="Save" onclick="initialiseusers()"/></td>
 <td><input type="button" value="Delete" onclick="deleteuser()"/></td> 
 </table>
 </form>
</div>
this is my JS page
function initialiseusers(){
$("#signupForm").validate({
    rules: {
        fname: "required",
        lname: "required",
        email:{
            required: true,
            email: true
        },
        password:{
            required: true,
            minlength: 5
        },
        phoneno:"required",
        roll:{
            required: true,
            minlength: 2
        },      
        messages: {
            fname:"Please enter your firstname",
            lname:"Please enter your lastname",
            email:"Please enter a valid email address",
            password:{
                required: "Please provide a password",
                minlength: "Your password must be at least 5 characters long"
            },
            phoneno:"Please enter your phoneno",
            roll:"Please enter your role"
        }
    }
         updateusers();// when the validation is over this function being called for updating the user.
});

But the validation is not working and when i click the save button.It directly saves Blank values inside my DB I downloaded the validation plugin and added it in the path also.,Any suggestions please?

  • 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-05-16T16:38:15+00:00Added an answer on May 16, 2026 at 4:38 pm

    The validation plugin binds to the form’s submit event, it’s not meant to be called in-line. Instead setup the validation, then call .valid() to check it, like this:

    $(function() {
      $("#signupForm").validate({
        rules: {
            fname: "required",
            lname: "required",
            email:{
                required: true,
                email: true
            },
            password:{
                required: true,
                minlength: 5
            },
            phoneno:"required",
            roll:{
                required: true,
                minlength: 2
            }
        },      
        messages: {
            fname:"Please enter your firstname",
            lname:"Please enter your lastname",
            email:"Please enter a valid email address",
            password:{
                required: "Please provide a password",
                minlength: "Your password must be at least 5 characters long"
            },
            phoneno:"Please enter your phoneno",
            roll:"Please enter your role"
        }
      });
    });
    function initialiseusers(){
      if($("#signupForm").valid())
        updateusers(); //called if successfully validated
    }
    

    You can test it here, .validate() sets up the validation, it doesn’t execute it, .valid() does, and returns a boolean of if it was successful.

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

Sidebar

Ask A Question

Stats

  • Questions 531k
  • Answers 530k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer user=> (doc name) ------------------------- clojure.core/name ([x]) Returns the name String… May 16, 2026 at 11:45 pm
  • Editorial Team
    Editorial Team added an answer You can do this extending the Proxy class. Check this… May 16, 2026 at 11:45 pm
  • Editorial Team
    Editorial Team added an answer Yes, this is exactly an appropriate usage of autorelease and… May 16, 2026 at 11:45 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I have a basic HTML form that gets inserted into a server side div
Please help! I have some form elements in a div on a page: <div
I have this page which loads quotes. It has a search form wherein if
i am receiving a piece of plain html from an ajax request. <h1>Title</h1> <div>
I have an HTML page divided vertically into Header Body Footer The body in
I've got an HTML page with a select and another control. I want the
Can I place something like the code below in a html page, and have
What I am doing is creating a simple html page in which there is
i'm trying to validate an html page using jquery, but nothing happens. it's a
I have a pretty simple HTML form where users can enter in information about

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.