js validation for mobile