At the moment making telephone optional requires quite a lot of coding. There is a discussion at github about this resulting in a module (github:/zsoerenm/magento2-optionaltelephone) being developed thats sole purpose is exactly this. However, the magento devs have already implemented a solution in core to address this. The fix in the development branch now and hopefully will soon be in master.
Best Answer
There are 3 different ways to use form validation in magento 2
To enable javascript validation use following code in your template
1
2
3
*custom-form is form id you can replace it with your form id
List of form validation rules
To wrap up this article, a list of validation rule names is provided here as a quick reference toward the official documentation:
Magento rules:
jQuery rules:
refer http://inchoo.net/magento-2/validate-custom-form-in-magento-2/