mask dont work

<div class="row">

 <div class="form-group col-md-6">

   <label for="cnpj">CNPJ </label>

    <SfMaskedTextBox Mask="00.000.000/0000-00" @bind-Value="@fornecedor.Cnpj"></SfMaskedTextBox>

        <ValidationMessage For="@(() => fornecedor.Cnpj)"></ValidationMessage>

 </div>


 <div class="form-group col-md-6">

   <label for="cpf">CPF</label>

  <SfMaskedTextBox ID="cpf" Mask="000.000.000.00" @bind-Value="@fornecedor.Cpf"></SfMaskedTextBox>

        <ValidationMessage For="@(() => fornecedor.Cpf)"></ValidationMessage>

 </div>

 </div>


hello my mask don't work. 


ErroMask.png


3 Replies

PM Ponmani Murugaiyan Syncfusion Team January 10, 2022 08:11 AM UTC

Hi Joao, 

Greetings from Syncfusion support. 

The provided code snippet is working as expected in all browsers (Chrome/Firefox/IE). Unfortunately we couldn’t replicate the reported issue in our end. Please find the sample and output below for reference. Also, we suggest you to upgrade the Syncfusion Nuget to latest version and ensure whether the reported issue has resolved in your end.  


<div class="row"> 
    <div class="form-group col-md-6"> 
        <label for="cnpj">CNPJ </label> 
        <SfMaskedTextBox Mask="00.000.000/0000-00" @bind-Value="@Cnpj"></SfMaskedTextBox> 
    </div> 
    <div class="form-group col-md-6"> 
        <label for="cpf">CPF</label> 
        <SfMaskedTextBox ID="cpf" Mask="000.000.000.00" @bind-Value="@Cpf"></SfMaskedTextBox> 
    </div> 
</div> 
 
@code { 
    public string Cnpj { get; set; } = "17963490000000"; 
    public string Cpf { get; set; } = "17963490000"; 
} 

 

Kindly check with the attached sample, suggestion. If issue still exists, we request to share the below details, which helps us to check and provide you the solution at earliest.. 

  1. Share Syncfusion Nuget version used in your application.
  2. Share browser details along with version.
  3. Whether you are using Blazor Server Side or WebAssembly application and .NET core version 3.5 or 5.0 in your application.
  4. The mask not working case reproduced with preselected value or dynamically changing value.
  5. If possible share issue reproducing sample or to replicate in the attached sample.

Regards, 
Ponmani M 



JN Joao Neto Soares Reis January 10, 2022 01:50 PM UTC

Hello, I understand how it works, because javascript doesn't load the first time on the page, so i refresh the page back to work, because (options.IgnoreScriptIsolation = true;)



PM Ponmani Murugaiyan Syncfusion Team January 11, 2022 04:52 AM UTC

Hi Joao, 

Thanks for the update. Please get back us if you need further assistance. 

Regards, 
Ponmani M 


Loader.
Up arrow icon