⭐🌟new schema builder and data validation library⭐🌟

last day alguerocode publish new schema builder and data validation, it’s very useful for user login validation. it’s volder.

visit volder.vercel.app to see more

volder is powerful Object schema validation, it lets you describe your data using a si…

Image description

last day alguerocode publish new schema builder and data validation, it’s very useful for user login validation. it’s volder.

visit volder.vercel.app to see more

volder is powerful Object schema validation, it lets you describe your data using a simple and readable schema and transform a value to match the requirements, it has custom error messages, custom types and nested schemas.



example

import { Volder, Email } from 'volder';


const userSchema = new Volder({
    username: {
        type: [String, 'username must be in string'],
        alphanumeric: [true, 'username should only contain letters and numbers'],
        minLength: [4, 'username at least 4 characters'],
        maxLength: [16, 'username at most 16 characters'],
        required: [true, 'username is required'],
        trim: true
    },
    email: {
        type: [String ,'email must be in string'],
        pattern: [Email, 'not valid email'],
        maxLength: [150, 'email be at most 150 characters'],
        required: [ true,'email is required'],
        trim: true
    },
    password: {
        type: [String , 'password must be in string'],
        minLength:[8, 'password should be at least 8 characters'],
        maxLength: [30, 'password should be at most 30 characters'],
        required: [ true, 'password is required'],
        matches: ["^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]$", 'password must contain numbers and letters']

    }
})

const { valid, errors, value } = userSchema.validate(input);

Print Share Comment Cite Upload Translate
APA
alguerocode | Sciencx (2024-03-29T07:20:02+00:00) » ⭐🌟new schema builder and data validation library⭐🌟. Retrieved from https://www.scien.cx/2022/01/29/%e2%ad%90%f0%9f%8c%9fnew-schema-builder-and-data-validation-library%e2%ad%90%f0%9f%8c%9f/.
MLA
" » ⭐🌟new schema builder and data validation library⭐🌟." alguerocode | Sciencx - Saturday January 29, 2022, https://www.scien.cx/2022/01/29/%e2%ad%90%f0%9f%8c%9fnew-schema-builder-and-data-validation-library%e2%ad%90%f0%9f%8c%9f/
HARVARD
alguerocode | Sciencx Saturday January 29, 2022 » ⭐🌟new schema builder and data validation library⭐🌟., viewed 2024-03-29T07:20:02+00:00,<https://www.scien.cx/2022/01/29/%e2%ad%90%f0%9f%8c%9fnew-schema-builder-and-data-validation-library%e2%ad%90%f0%9f%8c%9f/>
VANCOUVER
alguerocode | Sciencx - » ⭐🌟new schema builder and data validation library⭐🌟. [Internet]. [Accessed 2024-03-29T07:20:02+00:00]. Available from: https://www.scien.cx/2022/01/29/%e2%ad%90%f0%9f%8c%9fnew-schema-builder-and-data-validation-library%e2%ad%90%f0%9f%8c%9f/
CHICAGO
" » ⭐🌟new schema builder and data validation library⭐🌟." alguerocode | Sciencx - Accessed 2024-03-29T07:20:02+00:00. https://www.scien.cx/2022/01/29/%e2%ad%90%f0%9f%8c%9fnew-schema-builder-and-data-validation-library%e2%ad%90%f0%9f%8c%9f/
IEEE
" » ⭐🌟new schema builder and data validation library⭐🌟." alguerocode | Sciencx [Online]. Available: https://www.scien.cx/2022/01/29/%e2%ad%90%f0%9f%8c%9fnew-schema-builder-and-data-validation-library%e2%ad%90%f0%9f%8c%9f/. [Accessed: 2024-03-29T07:20:02+00:00]
rf:citation
» ⭐🌟new schema builder and data validation library⭐🌟 | alguerocode | Sciencx | https://www.scien.cx/2022/01/29/%e2%ad%90%f0%9f%8c%9fnew-schema-builder-and-data-validation-library%e2%ad%90%f0%9f%8c%9f/ | 2024-03-29T07:20:02+00:00
https://github.com/addpipe/simple-recorderjs-demo