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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T14:27:22+00:00 2026-05-13T14:27:22+00:00

I have a password inputfield where i have a md5 converter on it. The

  • 0

I have a password inputfield where i have a md5 converter on it.
The field is binded with my entity.password field (that is stored as an md5 hash).

I want to set a f:validateLength on it so a password must have a certain length.
Problem is that a “” empty String has also an md5 hash. The validator doesn’t check the actual input but the converted md5 hash.

Can i set the validator on the actual input, not the converted one?

<ice:inputSecret value="#{user.employer.user.password}" converter="md5hashconverter">
 <f:validateLength minimum="3" maximum="15"/>
</ice:inputSecret>

Thank you

Edit:
I’m using Hibernate and my backing bean is also the “model” managed bean. I persist with EntityManager.

  • 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-13T14:27:22+00:00Added an answer on May 13, 2026 at 2:27 pm

    You can’t.

    To me, this is also not really the right place to do the hash. It’s not a “conversion” (which is supposed to be 2-way). Rather do it at the data access layer, either yourself right prior to INSERT, or just by grabbing the DB’s builtin functions. Most of them provides sort of MD5() function which you can just use in your query like INSERT INTO user (name, pass) VALUES (?, MD5(?)).

    Edit: as per the update, you’re using Hibernate JPA. In this case you can either use JPQL to fire a “plain” save query with MD5() function inside, or to grab an EntityListener (guide here) and act on @PrePersist and maybe also @PreUpdate.

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

Sidebar

Related Questions

I have a password hash that is stored in a table and is put
I have the password field on page. I want to display text Enter password
I have a password field with Show password checkbox and I want to write
I have a password recovery control that is set up to ask the user
I have been trying to restrict the password field with a set of characters.
Here I have a password field: /*********************PASSWORD**********************/ $password = new Zend_Form_Element_Password('password'); $alnumValidator = new
I have a password validation script in PHP that checks a few different regular
I have following HTML code. writer input field is text filed. but I want
I have this password regex for an application that is being built its purpose
I have a password field in my registration form. The following is the code

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.