<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Pawan</title>
    <description>The latest articles on DEV Community by Pawan (@pawankumar123).</description>
    <link>https://dev.to/pawankumar123</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1243876%2F80ad3bad-83a7-4459-877e-323cbb954f91.png</url>
      <title>DEV Community: Pawan</title>
      <link>https://dev.to/pawankumar123</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pawankumar123"/>
    <language>en</language>
    <item>
      <title>Pattern(/^[^+%{}~?^:#!|=*;,\[\]&lt;&gt;"'`\¿\-]*$/) not accepting chars x,f,b on prod build while working on dev build for Validators</title>
      <dc:creator>Pawan</dc:creator>
      <pubDate>Fri, 29 Dec 2023 05:27:23 +0000</pubDate>
      <link>https://dev.to/pawankumar123/pattern-not-accepting-chars-xfb-on-prod-build-while-working-on-dev-build-for-validators-56dd</link>
      <guid>https://dev.to/pawankumar123/pattern-not-accepting-chars-xfb-on-prod-build-while-working-on-dev-build-for-validators-56dd</guid>
      <description>&lt;p&gt;I have Angular project with the following pattern with a file  &lt;strong&gt;app.component.ts&lt;/strong&gt; which  is like as follows and I'm using angular validator version "@angular/forms": "^14.2.0"  :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { FormBuilder, FormGroup, Validators } from '@angular/forms';

 [
          Validators.required,
          Validators.pattern(/^[^+%{}~?^:#!|=*;,\[\]&amp;lt;&amp;gt;"'`\¿\-]*$/),
          Validators.maxLength(64)
        ]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And my html file as &lt;strong&gt;app.component.html&lt;/strong&gt; :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;form [formGroup]="myForm"&amp;gt;
  &amp;lt;label for="name"&amp;gt;Name:&amp;lt;/label&amp;gt;
  &amp;lt;input type="text" id="name" formControlName="name" /&amp;gt;

  &amp;lt;div *ngIf="myForm.get('name')?.hasError('required')"&amp;gt;
    Name is required.
  &amp;lt;/div&amp;gt;

  &amp;lt;div *ngIf="myForm.get('name')?.hasError('pattern')"&amp;gt;
    Invalid characters in the name.
  &amp;lt;/div&amp;gt;

  &amp;lt;div *ngIf="myForm.get('name')?.hasError('maxlength')"&amp;gt;
    Name should not exceed 64 characters.
  &amp;lt;/div&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Kindly let me know why this pattern is not accepting x,f,b on production build while same is working on dev build for validator framework&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>angular</category>
      <category>validator</category>
      <category>typescript</category>
    </item>
  </channel>
</rss>
