asp.net remote validation only for one page

36 views Asked by At

I used remote validation, but I want use it in just Specified page not in other pages. How can I do that ?!?!

[Remote("IsUserExistsByEmail", "User")]

    public string MemberEmail { get; set; }

[AcceptVerbs("GET")]
    public async Task<IActionResult> IsUserExistsByEmail(string MemberEmail)
    {
        if (await _memberService.IsUserExistsByEmail_async(MemberEmail))
        {
            return Json($"Email {MemberEmail} is already in use.");
        }

        return Json(true);
    }
0

There are 0 answers