You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/**
*
* sets the JSON to validate into a known var
*
* @param {object} JSON
*
* @author Todd Geist, https://github.com/toddgeist
* @module JSON.Validate
* @see https://github.com/karbonfm/fm-json-validation
*/
JSON.Validate.Rule.IsRequired ( path)
/**
*
* A rule that tests for a value at the path
*
* @param {string} path the path to the value to test
*
* @returnSuccess {string} "" / nothing
* @returnError {object} JSON.Validate.Error an error
*
* @author Todd Geist, https://github.com/toddgeist
* @module JSON.Validate
* @see https://github.com/karbonfm/fm-json-validation
*
*/
JSON.Validate.Rule.IsOneOf ( path;theList)
/**
*
* A rule that test if a value is in a list
*
* @param {string} path the path to the value to test
* @param {string} theList carraige return deliminated list
*
* @returnSuccess {string} "" / nothing
* @returnError {object} JSON.Validate.Error an error
*
* @author Todd Geist, https://github.com/toddgeist
* @module JSON.Validate
* @see https://github.com/karbonfm/fm-json-validation
*
*/
JSON.Validate.Rule.IsNumeric ( path)
/**
*
* A rule that tests for a valid numeric value at the path
*
* @param {string} path the path to the value to test
*
* @returnSuccess {string} "" / nothing
* @returnError {object} JSON.Validate.Error an error
*
* @author John Renfrew, https://github.com/rwu2359
* @module JSON.Validate
* @see https://github.com/karbonfm/fm-json-validation
* @history 2017-11-18, John Renfrew, created
*
*/
JSON.Validate.ApplyRules ( ListOfRules)
/**
*
* Applies a list of Rules to the JSON set by JSON.Validate.This()
*
* @param {string} ListOfRule the list of rules made with List(JSON.Validate.Rule.<x>)
*
* @returnSuccess {string} "" / nothing
* @returnError {object} JSON.Validate.Error an error
*
* @author Todd Geist, https://github.com/toddgeist
* @module JSON.Validate
* @see https://github.com/karbonfm/fm-json-validation
*
*/