Validation

Hello.

I have a problem with RadzenRequiredValidator. Validation does not fire. My code is:

                <div class="row align-items-center" style="background-color: #d0e1e9">
                    <div class="align-items-center d-flex col-md-12">
                        <RadzenImage Path="assets/images/People-Doctor-Male-icon.png" style="height: 16px; margin-left: 16px">
                        </RadzenImage>
                        <RadzenLabel style="font-size: 24px; font-weight: bold; margin-left: 5px" Text="ΕΠΙΣΚΕΨΗ ΕΞΩΤΕΡΙΚΟΥ ΑΣΘΕΝΗ">
                        </RadzenLabel>
                    </div>
                </div>
                <div style="margin-top: 5px; padding-left: 10px" class="row">
                    <RadzenHeading Size="H4" style="color: #3a474d" Text="@patientSummary">
                    </RadzenHeading>
                </div>
                <div style="margin-top: 5px; background-color: lightgoldenrodyellow" class="row">
                    <div class="align-items-center d-flex col-md-12">
                        <RadzenButton ButtonStyle="ButtonStyle.Light" Image="assets/images/Places-user-identity-icon.png" Size="ButtonSize.Medium" style="background-color: rgba(230, 236, 239, 0.02); padding-left: 2px; padding-right: 2px; text-align: left; width: 120px" Text="Βιογραφικά" Click="@Button0Click">
                        </RadzenButton>
                        <RadzenButton ButtonStyle="ButtonStyle.Light" Image="assets/images/First-Aid-2-icon.png" style="background-color: rgba(230, 236, 239, 0.01); margin-left: 5px; padding-left: 2px; padding-right: 2px; text-align: left" Text="Εγγραφές" Click="@Button1Click">
                        </RadzenButton>
                    </div>
                </div>
                <div style="        background-color: palegoldenrod ; margin-top: 5px" class="row">
                    <div class="align-items-center d-flex col-md-12">
                        <RadzenButton ButtonStyle="ButtonStyle.Light" Disabled="@regOutFormControls.EditRecord" Icon="create" Size="ButtonSize.Medium" style="background-color: transparent; color: #414141; padding-left: 2px; padding-right: 2px; text-align: left; width: 140px" Text="Επεξεργασία" Click="@Button2Click">
                        </RadzenButton>
                        <RadzenButton ButtonStyle="ButtonStyle.Light" Disabled="@regOutFormControls.SaveRecord" Icon="save" style="background-color: transparent; color: #3a474d; margin-left: 5px; padding-left: 2px; padding-right: 2px; text-align: left" Text="Ενημέρωση" ButtonType="ButtonType.Submit">
                        </RadzenButton>
                    </div>
                </div>
                <div style="background-color: #f2eac7; margin-top: 5px" class="row">

                    <div class="align-items-center d-flex col-md-12">
                        <RadzenButton ButtonStyle="ButtonStyle.Light" Disabled="@regOutFormControls.DoInvoice" Icon="wysiwyg" Size="ButtonSize.Medium" style="background-color: transparent; color: #414141; padding-left: 2px; padding-right: 2px; text-align: left; width: 125px" Text="Τιμολόγηση" Click="@DoInvoice">
                        </RadzenButton>
                        <RadzenButton ButtonStyle="ButtonStyle.Light" Disabled="@regOutFormControls.DoPost" Icon="how_to_reg" style="background-color: transparent; color: #3a474d; margin-left: 5px; padding-left: 2px; padding-right: 2px; text-align: left" Text="Εγγραφή" Click="@DoPost">
                        </RadzenButton>
                        <RadzenButton ButtonStyle="ButtonStyle.Light"  Disabled="regOutFormControls.cmdReceipt" Icon="print" style="background-color: transparent; color: #3a474d; margin-left: 5px; padding-left: 2px; padding-right: 2px; text-align: left" Text="Απόδειξη">
                        </RadzenButton>
                       
                        <RadzenButton ButtonStyle="ButtonStyle.Light" Disabled="@regOutFormControls.cmdLabels" Icon="video_label" style="background-color: transparent; color: #3a474d; margin-left: 5px; padding-left: 2px; padding-right: 2px; text-align: left" Text="Ετικέτες">
                        </RadzenButton>
                    </div>
                </div>
                <RadzenFieldset style="margin-top: 10px" Text="Στοιχεία Εγγραφής">
                    <ChildContent>
                        <div style="background-color: transparent" class="row">
                            <div class="col-md-12" style="background-color: transparent">
                                <RadzenLabel style="color: #6d787d; width: 110px" Text="Αρ. Επεισοδίου">
                                </RadzenLabel>
                                <RadzenLabel style="margin-left: 5px; width: 120px" Text="@($"{(prmEpisodeNo)}")">
                                </RadzenLabel>
                                <RadzenLabel style="color: #6d787d; width: 110px" Text="Ημ. Εγγραφής">
                                </RadzenLabel>
                                <RadzenLabel style="margin-left: 5px; width: 100px" Text="@($"{(RecordEpisode.RegDate.ToString("d"))}")">
                                </RadzenLabel>
                                <RadzenLabel style="color: #6d787d; width: 46px" Text="Ώρα">
                                </RadzenLabel>
                                <RadzenLabel Text="@($"{(RecordEpisode.RegTime.ToString("t"))}")">
                                </RadzenLabel>
                            </div>
                        </div>
                        <div style="margin-top: 10px" class="row">
                            <div class="col-md-12 align-items-center d-flex">
                                <RadzenLabel style="font-weight: bold; width: 130px" Text="ΚΑΤΗΓΟΡΙΑ ΓΕΣΥ ">
                                </RadzenLabel>
                                <RadzenLabel style="font-weight: bold; width: 700px ; margin-left:10px;" Text=@gesyRightsDesc>
                                </RadzenLabel>
                            </div>
                        </div>

                        <div style="margin-right: 5px; margin-top: 10PX" class="row">
                            <div class="align-items-center d-flex col-md-6">
                                <RadzenLabel style="color: #6d787d; width: 150px" Text="Είδος Εισαγωγής">
                                </RadzenLabel>
                                <RadzenDropDown Name="ddlAdmClass" Data="@getTblAdmClassesResult" Disabled="@regOutFormControls.AdmissionClass" style="height: 30px; margin-left: 5px; width: 300px" TextProperty="AdmClass" @bind-Value="@(RecordEpisode.AdmissionClass)" ValueProperty="AdmID">
                                </RadzenDropDown>
                                <RadzenRequiredValidator Component="ddlAdmClass" Popup="true" Text="*">
                                </RadzenRequiredValidator>
                            </div>
                            <div class="align-items-center d-flex col-md-6">
                                <RadzenLabel style="color: #6d787d; width: 110px" Text="Νέο/Παλιό ">
                                </RadzenLabel>
                                <RadzenDropDown Data="@(planB.ieEpKind)" Disabled="@regOutFormControls.EpKind" style="height: 30px; margin-left: 5px; width: 100px" TextProperty="EpKind" ValueProperty="EpKind" Name="Dropdown6" @bind-Value="@(RecordEpisode.EpKind)">
                                </RadzenDropDown>
                            </div>
                        </div>
                        <div style="margin-right: 4px ; margin-top: 5PX" class="row">
                            <div class="d-flex col-md-6 align-items-start">
                                <RadzenLabel style="color: #6d787d; width: 150px" Text="Οικον. Κατηγορία">
                                </RadzenLabel>
                                <RadzenDropDown Data=@(planB.fc.Select(c => new { FinId = c.FinId, FinCode = c.FinCode }).Distinct().AsQueryable()) Disabled="@regOutFormControls.FinancialCat" style="height: 30px; margin-left: 5px; width: 400px" TextProperty="FinCode" @bind-Value="@(RecordEpisode.FinancialCat)" ValueProperty="FinId" Name="Dropdown3" Change="(() => FinCodeUpdated())">
                                </RadzenDropDown>
                            </div>
                            <div class="d-flex col-md-6 align-items-start">
                                <RadzenLabel style="color: #6d787d; width: 110px" Text="Περιγραφή">
                                </RadzenLabel>
                                <RadzenTextArea Disabled="@regOutFormControls.FinancialDetails" style="margin-left: 5px; width: 245px" @bind-Value="@(RecordEpisode.FinancialDetail)" Name="txtFinancialDetails">
                                </RadzenTextArea>
                                <RadzenRequiredValidator Component="txtFinancialDetails" Text="*" Popup="true">

                                </RadzenRequiredValidator>
                                <RadzenLengthValidator Min="2" Component="txtFinancialDetails" Text="*"></RadzenLengthValidator>
                            </div>
                        </div>
                        <div style="margin-right:5px ; margin-top: 5px" class="row">
                            <div class="align-items-center d-flex col-md-6">
                                <RadzenLabel style="color: #6d787d; width: 150px" Text="Γιατρός Επίσκ.">
                                </RadzenLabel>
                                <RadzenDropDown Data="@(planB.ieDoctors.Select(c => new { DrID = c.DrID, Doctor = c.Doctor }).Distinct().AsQueryable())" Disabled="@regOutFormControls.DrCode2" style="height: 30px; margin-left: 5px; width: 400px" TextProperty="Doctor" @bind-Value="@(RecordEpisode.DrCode2)" ValueProperty="DrID" Name="Dropdown2" Change="@Dropdown2Change" MouseEnter="@fillDoctorDDL">
                                </RadzenDropDown>
                            </div>
                            <div class="d-flex col-md-6 align-items-center">
                                <RadzenLabel style="color: #6d787d; width: 110px" Text="Ειδικότητα">
                                </RadzenLabel>
                                <RadzenDropDown Data="@(planB.ieSpecialities.Select(c => new { SpecID = c.SpecID, Spec = c.Spec }).Distinct().AsQueryable())" Disabled="@regOutFormControls.Spec" style="height: 30px; margin-left: 5px; width: 244.9375px" TextProperty="Spec" @bind-Value="@(RecordEpisode.Spec)" ValueProperty="SpecID" Name="Dropdown4" MouseEnter="(() => HandleSpecDDL())">
                                </RadzenDropDown>
                            </div>
                        </div>
                        <div style="margin-right:5px ; margin-top: 5PX" class="row">
                            <div class="col-md-12  d-flex align-items-start">
                                <RadzenLabel style="color: #6d787d; width: 150px" Text="Σχόλια">
                                </RadzenLabel>
                                <RadzenTextArea Disabled="@regOutFormControls.Complaints" Rows="2" style="margin-left: 5px; width: 620px" @bind-Value="@(RecordEpisode.Compaint)" Name="Textarea1">
                                </RadzenTextArea>
                            </div>
                        </div>

                    </ChildContent>
                </RadzenFieldset>
                <RadzenFieldset style="margin-top: 5px" Text="Στοιχεία Τιμολόγησης">
                    <ChildContent>
                        <div class="row">
                            <div class="col-md-4 col-sm-4 col-4 col-lg-4 col-xl-4 align-items-center d-flex">
                                <RadzenLabel style="color: #6d787d; width: 150px" Text="Αρ. Απόδειξης">
                                </RadzenLabel>
                                <RadzenLabel style="color: #6d787d; width: 100px" Text="@($"{(RecordEpisode.RecNo)}")">
                                </RadzenLabel>
                            </div>
                            <div class="col-md-4 col-sm-4 col-4 col-lg-4 col-xl-4 align-items-center d-flex">
                                <RadzenLabel style="color: #6d787d" Text="Τέλος Εγγραφής">
                                </RadzenLabel>
                                <RadzenLabel style="color: #6d787d; margin-left: 5px" Text="@($"{(RecordEpisode.AmountE != null ? RecordEpisode.AmountE.Value.ToString("C") : "0.00 €")}")">
                                </RadzenLabel>
                            </div>
                            <div class="col-md-4 col-sm-4 col-4 col-lg-4 col-xl-4 align-items-center d-flex">
                                <RadzenLabel style="color: #6d787d" Text="Πληρωμή">
                                </RadzenLabel>
                                <RadzenDropDown Data="@getTblPaymentMethodsResult" Disabled="@lockCtls" style="height: 30px; margin-left: 10px" TextProperty="PaymentMethodDesc" @bind-Value="@(RecordEpisode.PaymentMethod)" ValueProperty="PaymentMethodID" Name="Dropdown5">
                                </RadzenDropDown>
                            </div>
                        </div>
                    </ChildContent>
                </RadzenFieldset>
            </ChildContent>
        </RadzenTemplateForm>
    </ChildContent>
</RadzenContent> 

Where could I possibly have been wrong?

RadzenTemplateForm settings are not available in your code.

Hi. The RadzenTemplateForm tag is there (3rd line). Where could I possibly have gone wrong?

<RadzenContent Container="main">
    <ChildContent>
        <RadzenTemplateForm Data="@RecordEpisode" TItem="Test1.Models.Test1Data.TblEpisode"  Submit="@TemplateForm0Submit" InvalidSubmit="OnInvalidSubmit">
            <ChildContent>

                <div class="row align-items-center" style="background-color: #d0e1e9">
                    <div class="align-items-center d-flex col-md-12">
                        <RadzenImage Path="assets/images/People-Doctor-Male-icon.png" style="height: 16px; margin-left: 16px">
                        </RadzenImage>
                        <RadzenLabel style="font-size: 24px; font-weight: bold; margin-left: 5px" Text="ΕΠΙΣΚΕΨΗ ΕΞΩΤΕΡΙΚΟΥ ΑΣΘΕΝΗ">
                        </RadzenLabel>
                    </div>
                </div>

You can use markdown code blocks to post code in this forum.

Which validator does not fire?

Hi. The RadzenTemplateForm tag is there (3rd line). Where could I possibly have gone wrong?

<RadzenContent Container="main">
    <ChildContent>
        <RadzenTemplateForm Data="@RecordEpisode" TItem="Test1.Models.Test1Data.TblEpisode"  Submit="@TemplateForm0Submit" InvalidSubmit="OnInvalidSubmit">
            <ChildContent>

                <div class="row align-items-center" style="background-color: #d0e1e9">
                    <div class="align-items-center d-flex col-md-12">
                        <RadzenImage Path="assets/images/People-Doctor-Male-icon.png" style="height: 16px; margin-left: 16px">
                        </RadzenImage>
                        <RadzenLabel style="font-size: 24px; font-weight: bold; margin-left: 5px" Text="ΕΠΙΣΚΕΨΗ ΕΞΩΤΕΡΙΚΟΥ ΑΣΘΕΝΗ">
                        </RadzenLabel>
                    </div>
                </div>

Check if you have form component without @bind-Value - this might cause the validator to be valid by default.

ALL my controls in the have the @bind-value set. An example is shown below:

                                <div class="d-flex col-md-6 align-items-start">
                                    <RadzenLabel style="color: #6d787d; width: 110px" Text="Περιγραφή">
                                    </RadzenLabel>
                                    <RadzenTextArea Disabled="@regOutFormControls.FinancialDetails" style="margin-left: 5px; width: 245px" @bind-Value="@(RecordEpisode.FinancialDetail)" Name="txtFinancialDetails">
                                    </RadzenTextArea>
                                    <RadzenRequiredValidator Component="txtFinancialDetails" Text="*" Popup="true" Visible="true" Style="position: absolute">

                                    </RadzenRequiredValidator>
                                    <RadzenLengthValidator Min="2" Component="txtFinancialDetails" Text="*"></RadzenLengthValidator>
                                </div>

Any ideas?

I'm afraid that I don't have any other ideas. If you have Radzen subscription you can send us your application at info@radzen.com to debug it.

It's working now but only when I set the RequiredValidator's Popup property to True.
Any ideas why?

The problem before was that I didn't setup a button to type=Submit.