Validations with Telerik controls

1 Answer 53 Views
General Discussions
Daniel
Top achievements
Rank 1
Silver
Bronze
Daniel asked on 17 Mar 2022, 12:57 PM

Hi,

How I use validations with your controls ?

Thanks,

Daniel
Top achievements
Rank 1
Silver
Bronze
commented on 22 Mar 2022, 12:14 PM

ValidationErrorMessage is error.  

 <telerikInput:RadEntry Grid.Row="0" Grid.Column="1" x:Name="txtName" WatermarkText="Name" WidthRequest="200" Text="{Binding RouteName, Mode=TwoWay}" ValidationErrorMessage/>

                
Lance | Manager Technical Support
Telerik team
commented on 22 Mar 2022, 02:06 PM

There is no such property for RadEntry, where did you get that code from? Are you guessing on what code to try or was that copy/pasted form a WPF project? We do not document such a feature because it is not a feature for the plan RadEntry. Please follow the directions in my answer, you'll find the components that support validation is the MaskedEntry and DataGrid cell editing component.
Daniel
Top achievements
Rank 1
Silver
Bronze
commented on 22 Mar 2022, 02:28 PM

Does MaskedEntry  replace telerikInput:RadEntry if yes can you give sniped code ?
Lance | Manager Technical Support
Telerik team
commented on 22 Mar 2022, 02:57 PM

Daniel
Top achievements
Rank 1
Silver
Bronze
commented on 22 Mar 2022, 04:00 PM | edited

I need  validation to telerikInput:RadEntry .

I replace one with telerik:RadTextMaskedEntry.

I used this  and its look like that, where is the validation(icon) , i want enduser can type all text (all symboll).

   <telerik:RadTextMaskedEntry  Grid.Row="0" Grid.Column="1" ValidationErrorMessage="error" WidthRequest="200"/>
                

Daniel
Top achievements
Rank 1
Silver
Bronze
commented on 23 Mar 2022, 01:34 PM

Hi,

Can you please give me solution for problem above with sniped code ?

Thanks,

Lance | Manager Technical Support
Telerik team
commented on 23 Mar 2022, 02:00 PM

I don't see a mask in your code, you only put the validation error message and a width. This tells me you did not read the documentation.

Please carefully read all of the documentation. It is not very long and explains how to use a mask and what to use for different input types. If you have a custom input, you can use a Regex to validate your user's input

Daniel
Top achievements
Rank 1
Silver
Bronze
commented on 23 Mar 2022, 03:32 PM

Hi,

I used this regex : https://stackoverflow.com/questions/3085539/regular-expression-for-anything-but-an-empty-string

and is not working(regular-expression-for-anything-but-an-empty-string)

           <telerik:RadRegexMaskedEntry   Grid.Row="0" Grid.Column="1" Mask="^(?!\s*$).+" ValidationErrorMessage="{Binding RouteNameValidation, Mode=TwoWay}" WidthRequest="200" Value="{Binding RouteName, Mode=TwoWay}"/>
        



 SaveCommand = new Command(
              execute: async () =>
              {
    
                  if (string.IsNullOrEmpty(RouteName))
                  {
                          RouteNameValidation = "Route name can't be empty.";
                      return;
                  }

Thanks,

1 Answer, 1 is accepted

Sort by
0
Lance | Manager Technical Support
Telerik team
answered on 17 Mar 2022, 01:45 PM

Hi Daniel,

You will find a validation topic in the documentation for any control that validation is a relevant topic. You can search the documentation for "Validation"; if you are not sure what you're looking for just yet

Note: this is not the same thing you might be used to using in other frameworks like WPF. Xamarin.Forms and MAUI XAML is very different and doesn't have the same mechanisms. To learn more you can google/Bing "Validation in Xamarin.Forms" (.NET MAUI doesn't have many resources available, so you want to use "Xamarin.Forms" as a search term until MAUI has more content available.. even the official Microsoft documentation is very small because they are not done building it)

Regards,
Lance | Manager Technical Support
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
General Discussions
Asked by
Daniel
Top achievements
Rank 1
Silver
Bronze
Answers by
Lance | Manager Technical Support
Telerik team
Share this question
or