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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T09:32:57+00:00 2026-05-18T09:32:57+00:00

I have some custom validation I’d like to do with jQuery. jQuery validation comes

  • 0

I have some custom validation I’d like to do with jQuery. jQuery validation comes out of the box with a ‘required’ class. This means that I can have a script declaring

$('form').validate()

and the next textbox will validate correctly, based on the class ‘required’ I add to it:

<input type="text" value="" name="flowstatus" id="flowstatus" class="required">

My new validation rule is: the text in a textbox should be between 15 and 50 chars long. Is there a way to create my own custom rule/class to implement something like

<input type="text" value="" name="flowstatus" id="flowstatus" class="from15to50">

Note: This is NOT what I need:

('form').validate({
    rules: {
        flowstatus: {required: true, minlength: 15, maxlength: 50}
}}); 

This last script is too tightly coupled to the fields I want to validate.

  • 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-18T09:32:58+00:00Added an answer on May 18, 2026 at 9:32 am

    I’m pretty sure that you can add an attribute to the desired element defining its min and max lengths. Something like:

    <input type="text" value="" name="flowstatus" id="flowstatus" class="required" minlength="15" maxlength="50">
    

    I’m not quite sure about the custom class solution, however.

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

Sidebar

Related Questions

i have a validation class which needs improving. If I require some custom validation
I have developed some custom DAO-like classes to meet some very specialized requirements for
I'd like to make some custom MenuHeaders in WPF so I can have (for
I have a view that I want to add some custom drawing to. I
I have a custom control that implements IPostBackEventHandler. Some client-side events invoke __doPostBack(controlID, eventArgs).
I have a group of text boxes that have required field validation hooked up
I have a page with some custom validation which displays a result in a
I am creating a custom text box control to have some default formatting and
We have a project where a vendor produces some custom code for us and
I have inherited a visual studio 2003 project which uses some custom build steps.

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.