Jump to content

Recommended Posts

Good Evening...


I have created my application to enable users to sign up which leaves a e-mail address and GUID on the table that later requires First Name and Last Name to be mandatory.  However, the mandatory fields that I set as mandatory is not following the rules.   

Does anyone know how to logically check to ensure that the fields are not null?  

 

I have provided a example?  

 

function validateFormOnSubmit(theForm) {
var reason = "";

  reason += validateUsername(theForm.username);
  reason += validatePassword(theForm.pwd);
  reason += validateEmail(theForm.email);
  reason += validatePhone(theForm.phone);
  reason += validateEmpty(theForm.from);
      
  if (reason != "") {
    alert("Some fields need correction:\n" + reason);
    return false;
  }

  return true;
}

Link to comment
Share on other sites

5 hours ago, jrodriguez88 said:

Good Evening...


I have created my application to enable users to sign up which leaves a e-mail address and GUID on the table that later requires First Name and Last Name to be mandatory.  However, the mandatory fields that I set as mandatory is not following the rules.   

Does anyone know how to logically check to ensure that the fields are not null?  

 

I have provided a example?  

 

function validateFormOnSubmit(theForm) {
var reason = "";

  reason += validateUsername(theForm.username);
  reason += validatePassword(theForm.pwd);
  reason += validateEmail(theForm.email);
  reason += validatePhone(theForm.phone);
  reason += validateEmpty(theForm.from);
      
  if (reason != "") {
    alert("Some fields need correction:\n" + reason);
    return false;
  }

  return true;
}

Hi

I found a post which should be helpful.

Hope that helps 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...