Skip to content

Number #52

Description

@vedran-maestral

How do I validate just a number?

Activity

  1. brewsoftware commented on Apr 25, 2016

    @brewsoftware
    Contributor

    From an upcoming test case... There are several number validators available.

    isInt
    isDecimal
    isFloat
    isHexadecimal (technically this is also a number)...

    `

            <Form onValidSubmit={validSubmit}>
              <ValidatedInput
              type='text'
              label='Number'
              name='number'
              className='testInput'
              validate='required,isInt'
              errorHelp={{
                  required: 'Please enter a number',
                  isInt: 'Must be a whole number'
              }}
              />
            </Form>);
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions