Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

177
Views
Cómo enmascarar el número de teléfono sin tener cambio de modelo

Tengo un campo de entrada para la contraseña. Le he aplicado enmascaramiento para formatear el número de teléfono. Pero el problema es que también obtengo un número formateado en la variable ng-model.

Código -

 <div class="mb-4"> <label class="form-label" for="singupPhoneNumber"> Phone Number </label><span class="text-danger">*</span> <input type="text" id="singupPhoneNumber" name="cellPhone" ng-model="userData.phone" ng-maxlength="14" ng-minlength="14" class="form-control js-input-mask" placeholder="Enter Phone Number" data-hs-mask-options='{"mask": "(000) 000-0000"}' ng-required="true"> <span class="text-danger" ng-show="mainForm.cellPhone.$touched && mainForm.cellPhone.$invalid">Please enter your phone number.</span> </div>

En userData.phone obtengo un valor formateado como - (111) 232-3235

¿Cómo puedo obtener un valor limpio sin formato en la variable del modelo pero el formato debe estar en el cuadro de entrada?

Estoy usando jQueryMask

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!