Compare validation in blazor

  Рет қаралды 17,359

kudvenkat

kudvenkat

Күн бұрын

Пікірлер: 15
@sabnekarasha5381
@sabnekarasha5381 4 жыл бұрын
Excellent explaination👏👏👏👏
@conaxlearn8566
@conaxlearn8566 4 жыл бұрын
8:23 "I think this is a bit of inconsistency." Normally Venkat followed up with "To fix this, we can...." haha.
@conaxlearn8566
@conaxlearn8566 4 жыл бұрын
After 5 months, still not fixed. 😣
@vinothdharmaraj7510
@vinothdharmaraj7510 4 жыл бұрын
Hi Venkat, Why don't to write the EditEmployeeModel class inherit Employee class? is anything problem with that
@nys8260
@nys8260 4 жыл бұрын
Thank You, we can make the class like this: public class EditEmployeeModel : Employee { [CompareProperty("Email", ErrorMessage = "Email and Confirm Email must match")] public string ConfirmEmail { get; set; } }
@vinothdharmaraj7510
@vinothdharmaraj7510 4 жыл бұрын
Compare validation not work for two different types
@vinothdharmaraj7510
@vinothdharmaraj7510 4 жыл бұрын
It may work also like following but compare validation not work public class EditEmployeeModel { pubic Employee Employee {get; set;} = new Employee(); [CompareProperty("Email", ErrorMessage = "Email and Confirm Email must match")] public string ConfirmEmail { get; set; } }
@arkarsb8447
@arkarsb8447 4 жыл бұрын
'EmailDomainValidator' is inaccessible due to its protection level in EditEmployeeModels and can't change access modifier level in 'EmailDomainValidator'. What am I wrong? Please sir.
@alikerimerkan
@alikerimerkan 4 жыл бұрын
Why didnt we simply create a textbox with the id="ConfirmEmail" and add an eventhandler into it for checking if two email values are equal to each other? All this EditEmployeeModel class was completely unnecessary i think
@cookingincanada
@cookingincanada 4 жыл бұрын
I love your videos. I learned a lot from your video! Wanna be KZbin friends?
@eugenelee4351
@eugenelee4351 4 жыл бұрын
I put the same attribute to the Email property also, for comparing to the field of the "Confirmed email" , now when I change email i get the warning that the there is a mismatch between email and confirmed email fields
@conaxlearn8566
@conaxlearn8566 4 жыл бұрын
Yes, but when the emails match, the error message stays.
@PinasPiliNa999
@PinasPiliNa999 4 жыл бұрын
internal RenderFragment CreateCustomEditor(KeyValuePair cEditor) => builder => { if (cEditor.Value is ComboBoxEdit) { var c = cEditor.Value as ComboBoxEdit; PropertyInfo prop = mItem.GetType().GetProperty(c.FieldName); builder.OpenComponent(0, typeof(InputSelect)); var value = prop.GetValue(mItem); builder.AddAttribute(1, "Value", value); builder.AddAttribute(2, "class", "form-control h-100 w-100"); builder.AddAttribute(4, "ValueChanged", RuntimeHelpers.TypeCheck(EventCallback.Factory.Create (this, EventCallback.Factory.CreateInferred (this, __value => prop.SetValue(mItem, __value), (string)prop.GetValue(mItem))))); // Create an expression to set the ValueExpression-attribute. var constant = System.Linq.Expressions.Expression.Constant(mItem, mItem.GetType()); var exp = System.Linq.Expressions.MemberExpression.Property(constant, c.FieldName); var lamb = System.Linq.Expressions.Expression.Lambda(exp); builder.AddAttribute(5, "ValueExpression", lamb); builder.OpenElement(6, "option"); builder.AddAttribute(7, "value", "Wild"); builder.AddContent(8, "Wild"); builder.CloseElement(); //builder.AddMarkupContent(6, "Wild"); //builder.AddMarkupContent(7, "Common"); builder.CloseComponent(); @* Wild Domestic Common *@ } }; above code creates the InputSelect control but dropdown list does not contain any list. what am i missing ? kindly suggest
Blazor custom form validation
7:17
kudvenkat
Рет қаралды 21 М.
Players push long pins through a cardboard box attempting to pop the balloon!
00:31
Sigma Kid Mistake #funny #sigma
00:17
CRAZY GREAPA
Рет қаралды 24 МЛН
Creative Justice at the Checkout: Bananas and Eggs Showdown #shorts
00:18
Fabiosa Best Lifehacks
Рет қаралды 35 МЛН
Check Point: Phosphorus Solution Integrations
2:34
Phosphorus Cybersecurity Inc.
Рет қаралды 35
Brutally honest advice for new .NET Web Developers
7:19
Ed Andersen
Рет қаралды 274 М.
When You Shouldn't Use Await Async in .NET
7:51
Nick Chapsas
Рет қаралды 47 М.
What is REST API
10:43
kudvenkat
Рет қаралды 64 М.
Model Validation | Validation Attributes vs. FluentValidation | .NET 6
27:11
Blazor data binding
8:15
kudvenkat
Рет қаралды 34 М.
046 Anti forgery Tokens
4:52
Tech Support
Рет қаралды 29 М.
Blazor EventCallback
7:48
kudvenkat
Рет қаралды 35 М.
Players push long pins through a cardboard box attempting to pop the balloon!
00:31