Skip to content

Releases: Srabutdotcom/validate

validate value

Choose a tag to compare

@Srabutdotcom Srabutdotcom released this 06 Jun 13:29

validate a value in javascript using 1 mandatory argument and 2 optional arguments.

v1.0.3

Choose a tag to compare

@Srabutdotcom Srabutdotcom released this 26 May 15:33

Validate value based on types and/ or instance and / or values.
for example if i want to validate variable named "myvalue" with types = ["number"] and values = [20, 33]
just call

const isValid = validate(myvalue, ["number"], [20, 33])
// isValid will return either "true" if it is 20 or 30 otherwise will return "TypeError"

argument 1 and 2 is optional, if you don't provide it myvalue will be any types and any values

validate value

Choose a tag to compare

@Srabutdotcom Srabutdotcom released this 25 May 14:22

Validate value based on types and/ or instance and / or values.
for example if i want to validate variable named "myvalue" with types = ["number"] and values = [20, 33]
just call

const isValid = validate(myvalue, ["number"], [20, 33])
// isValid will return either "true" or "TypeError"

argument 1 and 2 is optional, if you don't provide it myvalue will be any types and any values

validate value

Choose a tag to compare

@Srabutdotcom Srabutdotcom released this 25 May 12:41

Validate value based on types and/ or instance and / or values.
for example if i want to validate variable named "myvalue" with types = ["number"] and values = [20, 33]
just call

const isValid = validate(myvalue, ["number"], [20, 33])
// isValid will return either "true" or "TypeError"

argument 1 and 2 is optional, if you don't provide it myvalue will be any types and any values

validate value

Choose a tag to compare

@Srabutdotcom Srabutdotcom released this 25 May 12:29

Validate value based on types and/ or instance and / or values.
for example if i want to validate variable named "myvalue" with types = ["number"] and values = [20, 33]
just call

const isValid = validate(myvalue, ["number"], [20, 33])
// isValid will return either "true" or "TypeError"

argument 1 and 2 is optional, if you don't provide it myvalue will be any types and any values