I am trying to implement simple CMS. I have `Page` class instances of which I want to add to the database and also to edit them. 
The `UrlName` in the `Page` should be unique so I made custom validator, though, while editing I cannot submit form without changing `UrlName` to an unexisting one. How can I pass extra data to my `VerifyUrl` or maybe there is another way to solve this problem?

```
public class Page : IUpdatable<Page>
{
    public int ID { get; set; }
    [Required]
    [DataType(DataType.Url)]
    [Remote(action: "VerifyUrl", controller: "Pages")]
    public string UrlName { get; set; }
}

```

This is my validating method in `PagesController`

```
public JsonResult VerifyUrl(string UrlName)   
{
    if (!db.Pages.Any(x => x.UrlName.Equals(UrlName)) )
         return Json(data: true);
    return Json(data: "This Url is already in use");
}

```

And this is in my View

```
<input asp-for="UrlName" class="form-control" />
<span asp-validation-for="UrlName" class="text-danger" />

```