Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 1 addition & 51 deletions data/en/cfparam.json
Original file line number Diff line number Diff line change
@@ -1,51 +1 @@
{
"name":"cfparam",
"type":"tag",
"syntax":"<cfparam name=\"\">",
"script":"cfparam(name=\"\", default=\"\", pattern=\"\");",
"related":["cfset","isDefined","isValid"],
"description":"Tests for a parameter's existence, tests its data type, and, if\n a default value is not assigned, optionally provides one.",
"params": [
{"name":"name","description":"Name of parameter to test (such as \"client.email\" or\n \"cookie.backgroundColor\"). If omitted, and if the\n parameter does not exist, an error is thrown.","required":true,"default":"","type":"string","values":[]},
{"name":"type","description":"The valid format for the data; one of the following.\n * any: any type of value.\n * array: an array of values.\n * binary: a binary value.\n * boolean: a Boolean value: yes, no, true, false, or a number.\n * creditcard: a 13-16 digit number conforming to the mod10 algorithm.\n * date or time: a date-time value.\n * email: a valid e-mail address.\n * eurodate: a date-time value. Any date part must be in the format dd\/mm\/yy, The format can use \/, -, or . characters as delimiters.\n * float or numeric: a numeric value.\n * guid: a Universally Unique Identifier of the form \"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\" where 'X' is a hexadecimal number.\n * numeric: a numeric value\n * integer: an integer.\n * query: a query object.\n * range: a numeric range, specified by the min and max attributes.\n * regex or regular_expression: matches input against pattern attribute.\n * ssn or social_security_number: a U.S. social security number.\n * string: a string value or single character.\n * struct: a structure.\n * telephone: a standard U.S. telephone number.\n * URL: an http, https, ftp, file, mailto, or news URL.\n * UUID: a ColdFusion Universally Unique Identifier, formatted 'XXXXXXXX-XXXX-XXXX-XXXXXXXXXXXXXXX', where 'X' is a hexadecimal number. See CreateUUID.\n * USdate: a U.S. date of the format mm\/dd\/yy, with 1-2 digit days and months, 1-4 digit years.\n * variableName: a string formatted according to ColdFusion variable naming conventions.\n * xml: XML objects and XML strings.\n * zipcode: U.S., 5- or 9-digit format ZIP codes.","required":false,"default":"Any","type":"string","values":["any","array","binary","boolean","creditcard","date","time","email","eurodate","float","numeric","guid","integer","query","range","regex","regular_expression","ssn","social_security_number","string","struct","telephone","url","uuid","usdate","variablename","xml","zipcode"]},
{"name":"default","description":"Value to set parameter to if it does not exist. Any\n expression used for the default attribute is evaluated,\n even if the parameter exists.\n The result is not assigned if the parameter exists,\n but if the expression has side effects, they still occur.","required":false,"default":"","type":"any","values":[]},
{"name":"max","description":"The maximum valid value; used only for range validation.","required":false,"default":"","type":"numeric","values":[]},
{"name":"min","description":"The minimum valid value; used only for range validation.","required":false,"default":"","type":"numeric","values":[]},
{"name":"pattern","description":"A regular expression that the parameter must match;\n used only for regex or regular_expression validation.","required":false,"default":"","type":"string","values":[]}
],
"engines": {
"coldfusion": {"minimum_version":"2", "notes":"", "docs":"https://helpx.adobe.com/coldfusion/cfml-reference/coldfusion-tags/tags-p-q/cfparam.html"},
"lucee": {"minimum_version":"", "notes":"", "docs":"https://docs.lucee.org/reference/tags/param.html"},
"railo": {"minimum_version":"", "notes":"", "docs":"http://railodocs.org/index.cfm/tag/cfparam"},
"openbd": {"minimum_version":"", "notes":"", "docs":"http://openbd.org/manual/?/tag/cfparam"},
"boxlang": {"minimum_version":"1.0.0", "notes":"`<bx:param>` in BoxLang", "docs":"https://boxlang.ortusbooks.com/boxlang-language/reference/components/system/param"}
},
"links": [],
"examples": [
{
"title":"cfparam in CFML",
"description":"A very basic CFML cfparam example",
"code" : "<cfparam name=\"userID\" default=\"0\"/>",
"result":""
},
{
"title":"cfparam in cfscript",
"description":"A very basic cfscript cfparam example",
"code" : "cfparam(name=\"userID\", default=0);\nparam userID=0;",
"result":""
},
{
"title":"Tag syntax using a regex",
"description": "Throws an error if the value is not one of a list of possible values",
"code":"<cfparam name=\"sortdir\" default=\"ASC\" type=\"regex\" pattern=\"ASC|DESC\"/>",
"result":""
},
{
"title": "param shorthand in cfscript",
"description": "Three ways to use the param shorthand inside of a cfscript tag",
"code": "param someVar; //declare the param\nparam someVar=5; //declare the param with a default value\nparam numeric someVar=3.1415; //declare the param with adefault value and set the type",
"result": "",
"runnable": true
}
]
}
{\n\t"name":"cfparam",\n\t"type":"tag",\n\t"syntax":"<cfparam name=\"\">",\n\t"script":"cfparam(name=\"\", default=\"\", pattern=\"\");",\n\t"related":["cfset","isDefined","isValid"],\n\t"description":"Tests for a parameter's existence, tests its data type, and, if\n a default value is not assigned, optionally provides one.",\n\t"params": [\n\t\t{"name":"name","description":"Name of parameter to test (such as \"client.email\" or\n \"cookie.backgroundColor\"). If omitted, and if the\n parameter does not exist, an error is thrown.","required":true,"default":"","type":"string","values":[]},\n\t\t{"name":"type","description":"The valid format for the data; one of the following.\n * any: any type of value.\n * array: an array of values.\n * binary: a binary value.\n * boolean: a Boolean value: yes, no, true, false, or a number.\n * creditcard: a 13-16 digit number conforming to the mod10 algorithm.\n * date or time: a date-time value.\n * email: a valid e-mail address.\n * eurodate: a date-time value. Any date part must be in the format dd\/mm\/yy, The format can use \/, -, or . characters as delimiters.\n * float or numeric: a numeric value.\n * guid: a Universally Unique Identifier of the form \"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\" where 'X' is a hexadecimal number.\n * numeric: a numeric value\n * integer: an integer.\n * query: a query object.\n * range: a numeric range, specified by the min and max attributes.\n * regex or regular_expression: matches input against pattern attribute.\n * ssn or social_security_number: a U.S. social security number.\n * string: a string value or single character.\n * struct: a structure.\n * telephone: a standard U.S. telephone number.\n * URL: an http, https, ftp, file, mailto, or news URL.\n * UUID: a ColdFusion Universally Unique Identifier, formatted 'XXXXXXXX-XXXX-XXXX-XXXXXXXXXXXXXXX', where 'X' is a hexadecimal number. See CreateUUID.\n * USdate: a U.S. date of the format mm\/dd\/yy, with 1-2 digit days and months, 1-4 digit years.\n * variableName: a string formatted according to ColdFusion variable naming conventions.\n * xml: XML objects and XML strings.\n * zipcode: U.S., 5- or 9-digit format ZIP codes.","required":false,"default":"Any","type":"string","values":["any","array","binary","boolean","creditcard","date","time","email","eurodate","float","numeric","guid","integer","query","range","regex","regular_expression","ssn","social_security_number","string","struct","telephone","url","uuid","usdate","variablename","xml","zipcode"]},\n\t\t{"name":"default","description":"Value to set parameter to if it does not exist. Any\n expression used for the default attribute is evaluated,\n even if the parameter exists.\n The result is not assigned if the parameter exists,\n but if the expression has side effects, they still occur.","required":false,"default":"","type":"any","values":[]},\n\t\t{"name":"max","description":"The maximum valid value; used only for range validation.","required":false,"default":"","type":"numeric","values":[]},\n\t\t{"name":"min","description":"The minimum valid value; used only for range validation.","required":false,"default":"","type":"numeric","values":[]},\n\t\t{"name":"pattern","description":"A regular expression that the parameter must match;\n used only for regex or regular_expression validation.","required":false,"default":"","type":"string","values":[]}\n\t],\n\t"engines": {\n\t\t"coldfusion": {"minimum_version":"2", "notes":"", "docs":"https://helpx.adobe.com/coldfusion/cfml-reference/coldfusion-tags/tags-p-q/cfparam.html"},\n\t\t"lucee": {"minimum_version":"", "notes":"", "docs":"https://docs.lucee.org/reference/tags/param.html"},\n\t\t"railo": {"minimum_version":"", "notes":"", "docs":"http://railodocs.org/index.cfm/tag/cfparam"},\n\t\t"openbd": {"minimum_version":"", "notes":"", "docs":"http://openbd.org/manual/?/tag/cfparam"},\n\t\t"boxlang": {"minimum_version":"1.0.0", "notes":"`<bx:param>` in BoxLang", "docs":"https://boxlang.ortusbooks.com/boxlang-language/reference/components/system/param"}\n\t},\n\t"links": [],\n\t"examples": [\n\t\t{\n\t\t\t\t"title":"cfparam in CFML",\n\t\t\t\t"description":"A very basic CFML cfparam example",\n\t\t\t\t"code" : "<cfparam name=\"userID\" default=\"0\"/>",\n\t\t\t\t"result":""\n\t\t},\n\t\t{\n\t\t\t\t"title":"cfparam in cfscript",\n\t\t\t\t"description":"A very basic cfscript cfparam example",\n\t\t\t\t"code" : "cfparam(name=\"userID\", default=0);\nparam userID=0;",\n\t\t\t\t"result":""\n\t\t},\n\t\t{\n\t\t\t\t"title":"Tag syntax using a regex",\n\t\t\t\t"description": "Throws an error if the value is not one of a list of possible values",\n\t\t\t\t"code":"<cfparam name=\"sortdir\" default=\"ASC\" type=\"regex\" pattern=\"ASC|DESC\"/>",\n\t\t\t\t"result":""\n\t\t},\n\t\t{\n\t\t\t\t"title": "param shorthand in cfscript",\n\t\t\t\t"description": "Three ways to use the param shorthand inside of a cfscript tag",\n\t\t\t\t"code": "param someVar; //declare the param\nparam someVar=5; //declare the param with a default value\nparam numeric someVar=3.1415; //declare the param with adefault value and set the type",\n\t\t\t\t"result": "",\n\t\t\t\t"runnable": true\n\t\t},\n\t\t{\n\t\t\t\t"title": "cfparam with type=\"query\"",\n\t\t\t\t"description": "Ensure a variable is a query object, providing an empty query as the default if it does not exist.",\n\t\t\t\t"code": "<cfparam name=\"variables.myQuery\" type=\"query\" default=\"#queryNew('id,name,age', 'integer,varchar,integer')#\">",\n\t\t\t\t"result": "",\n\t\t\t\t"runnable": false\n\t\t}\n\t]\n}\n
Loading