I am using MySQL with the Spring JDBC template for my web application. I need to store phone numbers with only digits (10). I am a little bit confused about data type using data type.
- What is the preferable data type for it in MySQL?
- What should be the Java data type in Bean (POJO) classes for that?
- How can I validate that datatype with javax validations/constraints for length and also only digit allowed?