1.0.1 • Published 8 months ago

max-string v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

max-string

max-string is a lightweight utility library that provides predefined maximum lengths for common data types and formats. This package simplifies your workflow for database schema validation, frontend form validation, and backend API validation. The values are derived from widely recognized international standards, ensuring accuracy and reliability.

📦 Installation

Install the package:

npm install max-string
yarn add max-string
pnpm add max-string

🌐 Use Cases

  1. Frontend Form Validation: Add constraints to input fields based on predefined maximum lengths.
  2. Backend API Validation: Validate incoming data payloads to meet expected length requirements. 3Database Schema Validation: Ensure your string column lengths are properly defined to avoid truncation.

📘 Usage

import { MAX_STRING } from 'max-string';

console.log(MAX_STRING.PHONE_NUMBER); // 15
1.0.1

8 months ago

1.0.0

8 months ago