public async Task <IHttpActionResult> ValidateMobile(string id, string mobile) { DataClassesManager.ControllerLog("info", "", this.Request.RequestUri.PathAndQuery, string.Empty); var error = string.Empty; var regExp = DataClassesManager.GetRegExpByCountry(id); var result = IdentityUtils.ExactMatch(mobile, regExp); if (result) { return(Ok()); } return(BadRequest()); }