Skip to content

Value should be string #1

Closed
Closed
@kotoulasphilip

Description

@kotoulasphilip

Environment

@vueform/vueform: 1.9.2
@vueform/plugin-mask: 1.0.3
@Vite: 5.0.2

Reproduction

To reproduce the error just try load a number to a textElement with mask

Describe the bug

The mask breaks my code with the error 'Error: value should be a string' when I attempt to load a number into the TextElement. I believe it would be beneficial to accept numbers as well, not just strings, since backend systems typically return numbers.

for example I tried to load a number (eg 40000) in this element:

    <TextElement
      name="price"
      label="Price"
      :mask="{
        mask: 'number',
        thousandsSeparator: '.', // any single char
        scale: 0, // digits after fractional delimiter, 0 for integers
      }"
    />

Additional context

No response

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions