# Force password policy

**URL:** <https://forum.keycloak.org/t/force-password-policy/19146>\
**Category:** Securing applications\
**Created:** [December 14, 2022, 3:42pm UTC](https://forum.keycloak.org/t/force-password-policy/19146 "2022-12-14T15:42:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![maxivis](https://avatars.discourse-cdn.com/v4/letter/m/8c91f0/32.png) [@maxivis](https://forum.keycloak.org/u/maxivis)\
**Post date:** [December 14, 2022, 3:42pm UTC](https://forum.keycloak.org/t/force-password-policy/19146/1 "2022-12-14T15:42:43Z")

</div>

Hi guys, I’m using Keycloak 19.0.3, and I’ve customized the password authentication, by extending UsernamePasswordForm, but now I want to validate the password format in server side, so, is there any way to force the application of the password policy in Java?  
Thanks in advance
