- π¬π·Greece vensires
Why not add a constraint validation on the field itself as described in https://www.drupal.org/docs/drupal-apis/entity-api/entity-validation-api... β ?
If you also want HTML5 validation, you could use https://api.drupal.org/api/drupal/core%21modules%21field%21field.api.php... to alter the field yourself. I don't think you will have any issues with that. - πΊπΈUnited States chucksimply
The Custom Field β module handles this effectively, and generally could be considered a replacement for this module.