formio / angular

JSON powered forms for Angular
https://formio.github.io/angular-demo
MIT License
619 stars 464 forks source link

[BUG] #1007

Closed JCDMaciel closed 2 months ago

JCDMaciel commented 8 months ago

Ambiente

Por favor, forneça o máximo de detalhes possível:

Passos para Reproduzir

  1. Acesse o https://formio.github.io/formio.js/app/builder.html
  2. Escolha um componente numérico.
  3. Cadastre uma "display mask" para o campo.

Comportamento Esperado

Que o campo numerico respeite o display mask

Comportamento Observado

O display mask não é respeitado

Exemplo

image

Para código ou JSON do formulário, por favor, coloque-o em um bloco de código:

{ "display": "form", "settings": { "pdf": { "id": "1ec0f8ee-6685-5d98-a847-26f67b67d6f0", "src": "https://files.form.io/pdf/5692b91fd1028f01000407e3/file/1ec0f8ee-6685-5d98-a847-26f67b67d6f0" } }, "components": [ { "label": "Number", "displayMask": "999.999.999-99", "applyMaskOn": "change", "mask": false, "tableView": false, "delimiter": false, "requireDecimal": false, "inputFormat": "plain", "truncateMultipleSpaces": false, "key": "number", "type": "number", "input": true }, { "type": "button", "label": "Submit", "key": "submit", "disableOnInvalid": true, "input": true, "tableView": false } ] }

olgabann commented 3 months ago

@JCDMaciel Thank you for reporting the issue. A ticket FIO-8052 has been created for review by our team

heather-formio commented 2 months ago

This example should be handled with a Text field, not a number component. Masks can be applied to Text Fields as needed to accomplish this use case. The format 999.999.999-99 should be handled as a string, as it is not a true numerical value.