Fix sms validation code