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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T06:27:05+00:00 2026-06-18T06:27:05+00:00

I am building an application that includes the ability for the user to enter

  • 0

I am building an application that includes the ability for the user to enter data into a database.
If a user enters some text, for example they try to enter a date, I want to be able to validate that the string they entered can be executed in an SQL query with out a problem.

I am coding in java, so I’m wondering if there are any small libraries out there that do this, or if I should use different reg-exes to do the validation.

I don’t want to rely on the database to do validation because (a) it could be slow if it is far away, and (b) I may want to implment some other custom validation rules (or let the user do it) and want to keep all my validation in a box.

Thanks

  • 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-18T06:27:07+00:00Added an answer on June 18, 2026 at 6:27 am

    Typically, you shouldn’t rely on the database’s definition of a date. Instead, you should declare a valid application format (e.g., MM/DD/YY) and use regular expressions, a library or your own code to validate the users input and then perform a transformation from the specified format to the database format (e.g., MM/DD/YY -> YY/MM/DD).

    If you are using an ORM, it will perform this conversion for you on specific types (like Java’s data classes) based on the underlying database. Otherwise, you have to do this yourself, but it’s best to seperate the input validation from the database specific transformation.

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

Sidebar

Related Questions

I'm building an application that needs to allow a user to insert text from
Background: We're building an application that allows our customers to supply data in a
I'm building an application that uses an elaborate API to fetch data from Youtube,
I am building an application that includes a feature to bulk tag millions of
I'm building a mfc application that will enable the user to draw graphical objects
I am building a Java EE application that includes functionality to process AMQP topics.
I'm currently building a small web application that includes a fair amount of JavaScript.
I'm building an application that is used by several different customers. Each customer has
I'm building a application that sends a test message to another email, the program
If I'm building an application that will have over 30 models, and I want

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.