Can you explain me what's the difference between ModelState.IsValid and ModelState.IsValid() in the example below? (Both of them are working)
var func = function () {
var ModelState = {
IsValid: function () {
return true
}
};
// ModelState.Isvalid() is working, too
document.body.innerHTML = ModelState.IsValid
? 'ModelState is valid' : 'ModelState is invalid'
};
<button onclick="func()">Click me</button>
As you can see above, ModelState is a json object. If I can call ModelState.IsValid, is IsValid called json property in this case?