Skip to content

Using is_valid_character prop of rx.number_input throws an error #17

Description

@abdullahkhalids

Describe the bug
Create a rx.number_input component, and add the prop is_valid_character="/^[Ee0-9+-.]$/". (here the default value, but any value fails). An error is thrown when anything is entered into it.

To Reproduce

  1. Compile this app
import reflex as rx

def index() -> rx.Component:
    return rx.number_input(is_valid_character='/^[Ee0-9+-.]$/')

app = rx.App()
app.add_page(index)
app.compile()
  1. Enter any character into the field, valid or invalid.

Expected behavior
The field should only accept correct input.

Screenshots
image

Specifics (please complete the following information):

  • Python Version: 3.10.12
  • Reflex Version: 0.3.2
  • OS: Debian testing

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions