# How confd can prompt customized errors on entering the invalid password according to the password-policy?

**URL:** <https://dmap-community.ductus.global/t/how-confd-can-prompt-customized-errors-on-entering-the-invalid-password-according-to-the-password-policy/4332>\
**Category:** CDB and CDB API\
**Created:** [February 1, 2023, 6:31am UTC](https://dmap-community.ductus.global/t/how-confd-can-prompt-customized-errors-on-entering-the-invalid-password-according-to-the-password-policy/4332 "2023-02-01T06:31:34Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![cohult](https://yyz2.discourse-cdn.com/flex010/user_avatar/dmap-community.ductus.global/cohult/32/221_2.png) [@cohult](https://dmap-community.ductus.global/u/cohult)\
**Post date:** [February 1, 2023, 10:52am UTC](https://dmap-community.ductus.global/t/how-confd-can-prompt-customized-errors-on-entering-the-invalid-password-according-to-the-password-policy/4332/3 "2023-02-01T10:52:23Z")

</div>

An example taken from a reply in 2021 on a similar topic: [Sha-512 encryption - #2 by cohult](http://dmap-community.ductus.global/t/sha-512-encryption/3665/2)

```auto
    type string {
      pattern ".*[0-9]+.*" {
        error-message "The password must have at least one digit";
      }
      pattern ".*[a-z]+.*" {
        error-message "The password must have at least one lower case alpha";
      }
      pattern ".*[A-Z]+.*" {
        error-message "The password must have at least one upper case alpha";
      }
      pattern ".*[<>~;:!@#/$%^&*=-]+.*" {
        error-message "The password must have at least one of these symbols: [<>~;:!@#/$%^&*=-]+";
      }
      pattern ".* .*" {
        modifier invert-match;
        error-message "The password must have no spaces";
      }
      length "8..max" {
        error-message "The password must be at least 8 characters long";
      }
    }

```

---

_[View the full topic](https://dmap-community.ductus.global/t/how-confd-can-prompt-customized-errors-on-entering-the-invalid-password-according-to-the-password-policy/4332)._
