# Possible wrong validation for IPv4 on DomainNameUtil

**URL:** <https://discourse.hibernate.org/t/possible-wrong-validation-for-ipv4-on-domainnameutil/446>\
**Category:** Hibernate Validator\
**Created:** [March 28, 2018, 6:53pm UTC](https://discourse.hibernate.org/t/possible-wrong-validation-for-ipv4-on-domainnameutil/446 "2018-03-28T18:53:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cat\_clan](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/cat_clan/32/119_2.png) [@cat\_clan](https://discourse.hibernate.org/u/cat_clan)\
**Post date:** [March 28, 2018, 6:53pm UTC](https://discourse.hibernate.org/t/possible-wrong-validation-for-ipv4-on-domainnameutil/446/1 "2018-03-28T18:53:51Z")

</div>

I was looking at the email validator and noticed an issue with the DomainNameUtil. The IP address validation pattern is set to “[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}”.This accepts IP address like 999.999.999.999, which is not a valid IP. A more valid version could be ((25[0-5]|2[0-4]\d|[01]?\d\d?).){3}((25[0-5]|2[0-4]\d|[01]?\d\d?)), but not sure if this is something that should be fixed or not.

---

<div class="post-metadata">

**Author:** ![gsmet](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/gsmet/32/9_2.png) [@gsmet](https://discourse.hibernate.org/u/gsmet)\
**Post date:** [March 29, 2018, 9:38pm UTC](https://discourse.hibernate.org/t/possible-wrong-validation-for-ipv4-on-domainnameutil/446/2 "2018-03-29T21:38:16Z")

</div>

Yes, we are not very thorough in checking that because we think it does not have that much value.

Did you experience a real problem with it?
