This is a migrated thread and some comments may be shown as answers.

kendo-textbox for passwords

1 Answer 802 Views
TextBox
This is a migrated thread and some comments may be shown as answers.
Catalin
Top achievements
Rank 1
Veteran
Catalin asked on 28 May 2020, 04:49 PM

Hi, 
Floating labels are great, thanks!

I'm trying to implement this new widget for passwords like this:

                <kendo-textbox for="Password" type="password" >
                    <textbox-label content="Mot de passe" floating="true" />
                </kendo-textbox>

Here’s my Password property:

 [Required(ErrorMessage = "Ce champ est obligatoire")]
 [DataType(DataType.Password)]
public string Password { get; set; }

How can I accomplish this?

Thanks again

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 02 Jun 2020, 02:32 PM

Hello Catalin,

I am happy to hear the new TexBox component along with its floating labels is well accepted.

To enable validation for the password textbox I would suggest setting it required and invoke Kendo Validator :

        $("#Password").prop('required', 'required');

        $(function () {
            $("#submit").kendoValidator();
        });

For your convenience, I have prepared a small ASP.NET Core project implementing a form with a Tag Helper TexBox as a password. The field is bound to a model and on a submit button clicks logs into the console the selected provided values.

Let me knwo if you have any questions.

Regards,
Nikolay
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
TextBox
Asked by
Catalin
Top achievements
Rank 1
Veteran
Answers by
Nikolay
Telerik team
Share this question
or