The custom validator we created in this chapter should provide client-side validation support as well. By default, EF will only perform server-side validation (out of the box), but the client-side validation should be performed manually. The framework has provision to inject custom validation and its errors in the context attributes. However, we need to perform/implement client-side validation on our own.
The FutureOnly custom validation attribute can be configured to support client-side validation using IClientModelValidator, which expects us to implement the AddValidation method. We should be injecting the required custom validation values in the context attributes; the required implementation ...