I have a property that due to a previous question I disable it.
.Field(new FieldReflector<UploadDocumentForm>(nameof(UploadDocumentForm.StatusContent))
.SetActive((state) => false))
But nevertheless it is possible that through another option I need to do a validation on that field, and send a message to the user depending on what he selects. Would it be possible to do it? I do not know if a field can be valid having used the "FieldReflector".
thanks in advance
Yes, you can leverage
SetValidate()
ofFieldReflector
Class to implement your requirement.If you need to prompt user when he failed the valiadation, you can leverage the Feedback property of
ValidateResult
. If you want to always send message to your ueser, you can leverageMessage()
ofFormBuilder
.Here is the code snippet: