Formify Docs

Min

Enforce a minimum numeric value.

Min

Validates that a numeric value is at least a given minimum. Works with numbers and numeric strings.

Configuration

Config flagTypeDescription
minnumberMinimum accepted value.
min[number, string]Tuple form — the minimum plus a custom message.

With useForm

const form = useForm({
  initialValues: { age: '' },
  validationSchema: {
    age: { min: 18 },
  },
});

With a custom message:

age: { min: [18, 'You must be at least 18 years old'] }

With the V builder

import { V } from 'formify-js';

V.min(18);

Default message

ScenarioMessage
Value is below the minimumMust be at least 18 (the number reflects your value)

Examples

ValueRuleResult
'18'min: 18✅ Valid (inclusive)
'17.9'min: 18❌ Invalid
-5min: 0❌ Invalid

Notes

  • The check is inclusive: a value of exactly 18 passes min: 18.
  • Non-numeric values fail the comparison — pair with numeric or integer for clearer errors.
  • Use between to constrain both ends at once.

On this page