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

medhira-rn-typescript-hooks

v0.0.1

Published

MEDHIRA - React Native TypeScript validation hooks

Readme

medhira-rn-typescript-hooks

MEDHIRA - React Native TypeScript validation hooks

medhira

Engineering Intelligence Across Everything

npm package npm downloads License: MIT

Installation

# Expo
npx expo install medhira-rn-typescript-hooks

# React Native
npm install --save medhira-rn-typescript-hooks

Hooks

This library provides validation hooks for React Native forms:

  • useValidateForm - Form input validation hook
  • useValidateSelect - Dropdown/select validation hook
  • useValidateCheckBox - Checkbox validation hook

useValidateForm

Form validation hook with support for string and number types, min/max values, and regex patterns.

import { useValidateForm } from 'medhira-rn-typescript-hooks';

const form = useValidateForm({
  type: 'string',
  label: 'Email',
  isRequired: true,
  keyboard: 'email-address',
  validationPattern: /^[^\s@]+@[^\s@]+\.[^\s@]+$/,
  validError: 'Please enter a valid email',
});

return (
  <TextInput
    value={form.value}
    onChangeText={form.valueChangeHandler}
    onFocus={form.valueFocusHandler}
    onBlur={form.valueBlurHandler}
    disabled={form.inputIsDisabled}
  />
);

useValidateSelect

Dropdown/select validation hook with single and multiple selection support.

import { useValidateSelect } from 'medhira-rn-typescript-hooks';

const select = useValidateSelect({
  itemsList: [
    { label: 'Option 1', value: '1' },
    { label: 'Option 2', value: '2' },
  ],
  isRequired: true,
  multiple: false,
});

return (
  <Picker
    selectedValue={select.value}
    onValueChange={select.onChangeValueCallBack}
  />
);

useValidateCheckBox

Checkbox validation hook with required checkbox support.

import { useValidateCheckBox } from 'medhira-rn-typescript-hooks';

const checkbox = useValidateCheckBox({
  isRequired: true,
  value: false,
  validError: 'Please accept the terms',
});

return (
  <Checkbox
    checked={checkbox.value}
    onChange={checkbox.onValueChangeHandler}
  />
);

API Reference

useValidateForm Options

| Option | Type | Required | Default | Description | |--------|------|----------|---------|-------------| | type | string | Yes | - | 'string' or 'number' | | label | string | Yes | - | Field label | | isRequired | boolean | No | false | Required field | | keyboard | string | No | 'default' | Keyboard type | | minValue | number | No | - | Minimum value (number type) | | maxValue | number | No | - | Maximum value (number type) | | minLength | number | No | - | Minimum length (string type) | | maxLength | number | No | - | Maximum length (string type) | | defaultValue | string | number | No | - | Default value | | validationPattern | RegExp | No | - | Validation regex pattern |

useValidateSelect Options

| Option | Type | Required | Default | Description | |--------|------|----------|---------|-------------| | itemsList | array | Yes | - | List of items | | isRequired | boolean | No | false | Required selection | | defaultValue | string | array | No | - | Default value | | multiple | boolean | No | false | Allow multiple | | min | number | No | 0 | Min selections | | max | number | No | 100 | Max selections |

useValidateCheckBox Options

| Option | Type | Required | Default | Description | |--------|------|----------|---------|-------------| | isRequired | boolean | No | false | Required checkbox | | value | boolean | No | false | Initial value | | validError | string | No | - | Error message | | checkedColor | string | No | '#000000' | Checked color | | uncheckedColor | string | No | '#a8a8a8' | Unchecked color |

Contributing

Contribution are always welcome, no matter how large or small!

We want this community to be friendly and respectful to each other. Please follow it in all your interactions with the project.

Please feel free to drop us an email at MEDHIRA

Sponsor & Support

To keep this library maintained and up-to-date please consider sponsoring it on GitHub. Or if you are looking for a private support or help in customizing the experience, then reach out to us on LinkedIn https://www.linkedin.com/in/smuniharish.

License

MIT


Made with love by MEDHIRA