valid number validation javascript code example Example: validatorjs number const validationRule = 'required|numeric';