Skip to content

Releases: devSupporters/volder

2.0.3: update license and fix readme typo in usage section.

Choose a tag to compare

@alguerocode alguerocode released this 16 Feb 07:11
import { Volder } from 'volder';

const personSchema = new Volder({
  name:{ type: String, required: true, maxLength: 10, trim: true },
  age: { type: Number, min: 18, sign: 'positive' }
})

const { valid, errors, value } = personSchema.validate({name: "max  ", age: 19}); // we forget adding a validate function.
// { valid: true, errors: {}, value: {name: "max", age: 19}}

fix: email validation, first index contain letter , accept some symbols

Choose a tag to compare

@alguerocode alguerocode released this 02 Feb 18:47

fix: email validation, first index contain letter , accept some symbols
src/lib/volder-types/email.js

export const Email = (input) => {
  const regex = /^[\w.~!#$%&'*+-/=?^_`{|]+@[a-zA-Z\d.-]+\.[a-zA-Z]{2,6}$/;
  const code = String(input).charCodeAt(0);

  if (!(code > 64 && code < 91) && !(code > 96 && code < 123)) {
    return false;
  }
  return regex.test(String(input))
};

fix volder publish to npm issue

Choose a tag to compare

@alguerocode alguerocode released this 29 Jan 17:16

fix volder publish to npm issue

new volder and new things

Choose a tag to compare

@alguerocode alguerocode released this 29 Jan 16:47

volder comes with major things and feature to improve validation and simplify to the developer to complete here work with full patiant

some changes

Choose a tag to compare

@alguerocode alguerocode released this 15 Oct 07:23

change from importing Volder as defualt to be in an object

import { Volder } from 'volder';

1.3.2 fix

Choose a tag to compare

@alguerocode alguerocode released this 12 Oct 10:45

fix nested schema issues

1.3.1

Choose a tag to compare

@alguerocode alguerocode released this 11 Oct 17:04

the clear and public release

  • some bugs fixes

1.3.0

Choose a tag to compare

@alguerocode alguerocode released this 11 Oct 12:29

features

  • support schema volder typess ( nested volder)
  • add trim , min and max to null type
  • add custom type by adding your function

custom error message and clean code

Choose a tag to compare

@alguerocode alguerocode released this 05 Oct 16:53
f6becbf

add custom error message by doing array

const volderSchema  = new Volder({
  name:{
type:[String, 'type should be string']
})

more features added:

Choose a tag to compare

@alguerocode alguerocode released this 02 Oct 16:14
1fb68d3
  • trim property option to trim the string before validating
  • boolean case
  • just constructor function