In the meantime, the documentation is there and available here. In a nutshell you just need to decorate your view model's property with the following:
[Remote(action: "Foo", controller: "Bar", ErrorMessage = "Remote validation is working")]
[Required]
[Display(Name = "Name")]
public string Name { get; set; }
Then create an action (named 'Foo' in this example) in the controller (named 'Bar' in this example) and add your logic there:
[AcceptVerbs("Get", "Post")]
public async Task<IActionResult> Foo(string name)
{
bool exists = await this.Service.Exists(name);
if (exists)
return Json(data: false);
else
return Json(data: true);
}
Final note: the Remote attribute is in the Microsoft.AspNetCore.Mvc namespace.