npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@iq-firebolt/validators

v0.11.1

Published

> TODO: description

Downloads

671

Readme

Firebolt Validator

alt text

alpha state A package full of brazilian based validations, designed to be used with firebolt-api and firebolt-client, or also with standalone applications.

Getting started

The following instructions show you how to install the package and create your own validation

Prerequisites

Requirements for the software and other tools to build, test and push

Installing

You need to install this package using npm or yarn and you should be ready to go

npm

npm install --save redventures/@iq-firebolt/validators

yarn

yarn add redventures/@iq-firebolt/validators

Usage

Validating standalone values

Using 'validate' function

import { validate } from '@iq-firebolt/validators'

const isValueValid = validate('phone', '(11) 91234-1234).isValid

Using validators map

import { validators } from '@iq-firebolt/validators'

const isValueValid = validators.phone.run('(11) 91234-1234').isValid

Complex validators

Some validators need some extra data to validate a given value

import { validate } from "@iq-firebolt/validators"

// validate(validatonName: string, value: any, properties: {})

const isValid = validate('bankAccountNumber', '123242-2', {bankSlug: "itau"}).isValid

Group validation

Is possible to validate multiple fields at the same time with validateGroup

import { validateGroup } from "@iq-firebolt/validators"

const fieldsValidation = validateGroup(
    ['cpf', '584.298.880-12'],
    ['name', 'random johson4'],
    ['minAge', '19/12/1999', { 'minAge': 18 }],
    ['cep', '13224-430']
) // {allFieldsValid: boolean, invalidFields: []}

Firebolt focused functionality

This functions are used on firebolt-api and firebolt-client libs, it provides a convenient design to validate fields in a multistep form context, where inter relationships between fields are common.

validateFBTField and validateFBTStep

Validates a field created by a firebolt dynamic form. It relates the field defined on the firebolt step scheme and the filled form payload, it also can use other fields as parameter to validations. ex.: To validate a bank account, we need to consider other form fields as bank brand, agency, etc.

import { validateFBTField, validateFBTStep } from '@iq-firebolt/validators'

const fireboltStepFieldScheme = {
    fields: [
      {
        "slug": "bank_name",
        "validators": [
          {
            "type": "required"
          }
        ]
      },
      {
        "slug": "bank_branch",
        "validators": [
          {
            "type": "required"
          }
        ]
      },
      {
        "slug": "bank_account_type",
        "validators": [
            {
              "type": "required"
            }
          ]
      },
      {
        "slug" : "bank_account_number",
        "validators": [
          {
            'type': 'bankAccountNumber',
            'properties': {
              'bankBranch': 'field:bank_branch',
              'bankSlug': 'field:bank_name',
              'accountType': 'field:bank_account_type',
            },
          },
        ]
      }
    ]

    const formPayload: {
      bank_branch: '0102',
      bank_name: 'itau',
      account_type: '012',
      bank_account_number: '2342325-3'
    }

    // Validating a single field

    const fields = fireboltStepFieldScheme.fields
    const fieldBankScheme = fields[3]
    const isFieldValid = validateFBTField(fieldBankScheme, formPayload)

    // Validating full step

    const isStepValid = validateFBTStep({stepFields: fields, formPayload })
}

Running the tests

Jest is installed to automated tests

How to execute tests

All you have to do is run

npm

npm run test

yarn

yarn run test

Deployment

Every time you add a new validation you have to commit your changes and update package installed on your project

yarn build