Fixed typo in test name
Refactoring phone validation for reuse

Issue: #333
Fix JavaScript errors with phone validation

Issue: #333