Manual Validation is not working for elements looped in an array (@bind-Text=address[iteration]) #2559
DurgaSanthi
started this conversation in
General
Replies: 1 comment 5 replies
-
I would say you use the |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Blazorise - Manual Validation is not working because of array value used to bind the text. Example: @bind-Text="address[iteration]"
This works for auto validation but not for manual validation
<Validations @ref="validations" Mode="ValidationMode.Manual">
Created TextEdit components in loop. For example there are 10 elements and Element Id = addressid[0], addressid[1] etc.
And the @bind-Text="address[0]" etc
Below is the exception am getting.
Exception message:
Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
Unhandled exception rendering component: The provided expression contains a InstanceMethodCallExpression1 which is not supported. FieldIdentifier only supports simple member accessors (fields, properties) of an object.
System.ArgumentException: The provided expression contains a InstanceMethodCallExpression1 which is not supported. FieldIdentifier only supports simple member accessors (fields, properties) of an object.
at Microsoft.AspNetCore.Components.Forms.FieldIdentifier.ParseAccessor[String](Expression1 accessor, Object& model, String& fieldName) at Microsoft.AspNetCore.Components.Forms.FieldIdentifier.Create[String](Expression1 accessor)
at Blazorise.Validation.InitializeInputExpression[String](Expression`1 expression)
at Blazorise.TextEdit.SetParametersAsync(ParameterView parameters)
Can someone help
Beta Was this translation helpful? Give feedback.
All reactions