Title: Validation using database
Last modified: January 1, 2025

---

# Validation using database

 *  Resolved [theBlick](https://wordpress.org/support/users/theblick/)
 * (@theblick)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/validation-using-database/)
 * Is it possible to validate my Lot Number field with a database of valid lot numbers
   so only correct entries in this field can be submitted? If so, where can I find
   the documentation to do it?
 * Thank you.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fvalidation-using-database%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Support [Ralden Souza](https://wordpress.org/support/users/rsouzaam/)
 * (@rsouzaam)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/validation-using-database/#post-18223457)
 * Hi [@theblick](https://wordpress.org/support/users/theblick/),
 * Thanks for reaching out!
 * I see the **Lot Number** field in your form. It seems you’re using our [Single Line Text](https://wpforms.com/docs/how-to-choose-the-right-form-field-for-your-forms/#single-line-text)
   field.
 * With WPForms Lite, you can [set up form notifications](https://wpforms.com/docs/setup-form-notification-wpforms/)
   to send out form submission details to your preferred email address.
 * Currently, WPForms Lite does not have the feature to store entries, and we’ve
   provided clarification about this on the [Entries page in Lite](https://a.supportally.com/BsGxe8).
   However, enabling the **Lite Connect** option will back-up the entries submitted
   through your forms. This means that if you decide to upgrade to WPForms Pro, 
   you can restore your entries and have instant access to reports. Please check
   [this guide](https://wpforms.com/docs/how-to-use-lite-connect-for-wpforms/) for
   more details about this feature.
 * If ever you decide to upgrade to the paid version, you’ll be able to restore 
   your entries and store and manage future entries on your site.
 * That said, implementing your request would require custom code to validate your**
   Lot Number** field, and I apologize as customizations like this fall outside 
   the scope of our support.
 * To achieve this, here are two options:
 * 1. **Use the **`wpforms_process_validate_text`** action**
 * This action allows you to validate text fields during form submission. You can
   refer to our documentation for this hook [here](https://wpforms.com/developers/wpforms_process_validate_text/).
   With custom code using this action, you can retrieve the value from your database
   and validate it during the form submission process.
 * 2. **Leverage the **`wpforms_field_data`** filter hook**
 * This filter allows you to modify field data before it’s rendered. By hooking 
   into this filter, you can fetch the data from your database and apply it as needed
   to the Lot Number field.
 * Here is how the filter can be used:
 *     ```wp-block-code
       add_filter( 'wpforms_field_data', function ( $field, $form_data ) {     //write their own code here.     return $field; }, 10, 2 );
       ```
   
 * In case you’d like to look into custom development options, we highly recommend
   posting your customization job [here](https://jobs.wordpress.net/).
 * I hope this helps! If you’d like more assistance with using WPForms Lite, please
   feel free to reach out.
 * Thanks!
 *  Thread Starter [theBlick](https://wordpress.org/support/users/theblick/)
 * (@theblick)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/validation-using-database/#post-18225406)
 * Thank you so much for the information. My follow-up question is can I implement
   your Option 1 `wpforms_process_validate_text`** **with the Basic paid version
   or does it require one of the higher priced options?
 * Thanks.
 *  Plugin Support [Ralden Souza](https://wordpress.org/support/users/rsouzaam/)
 * (@rsouzaam)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/validation-using-database/#post-18228227)
 * Hi [@theblick](https://wordpress.org/support/users/theblick/),
 * Thanks for your follow-up question!
 * Since the [Single Line Text](https://wpforms.com/docs/how-to-choose-the-right-form-field-for-your-forms/#single-line-text)
   field is part of [our Standard Fields](https://wpforms.com/docs/how-to-choose-the-right-form-field-for-your-forms/),
   you can use the `wpforms_process_validate_text` action with WPForms Lite (our
   free version) or any paid license, including the [Basic license level](https://wpforms.com/pricing/).
 * I hope this helps!
 *  Plugin Support [Ralden Souza](https://wordpress.org/support/users/rsouzaam/)
 * (@rsouzaam)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/validation-using-database/#post-18232466)
 * Hi [@theblick](https://wordpress.org/support/users/theblick/),
 * We haven’t heard back from you in a few days, so I’m going to go ahead and close
   this thread for now. But if you’d like us to assist further, please feel welcome
   to continue the conversation.
 * Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Validation using database’ is closed to new replies.

 * ![](https://ps.w.org/wpforms-lite/assets/icon.svg?rev=3254748)
 * [WPForms - Easy Form Builder for WordPress - Contact Forms, Payment Forms, Surveys, & More](https://wordpress.org/plugins/wpforms-lite/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wpforms-lite/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wpforms-lite/)
 * [Active Topics](https://wordpress.org/support/plugin/wpforms-lite/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wpforms-lite/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wpforms-lite/reviews/)

## Tags

 * [field validation](https://wordpress.org/support/topic-tag/field-validation/)

 * 4 replies
 * 2 participants
 * Last reply from: [Ralden Souza](https://wordpress.org/support/users/rsouzaam/)
 * Last activity: [1 year, 4 months ago](https://wordpress.org/support/topic/validation-using-database/#post-18232466)
 * Status: resolved