Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
152 changed files
with
25,063 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"dependencies":{ | ||
"cbvalidation":"1.0.0", | ||
"cborm":"1.0.0", | ||
"cbmessagebox":"1.0.0", | ||
"cbi18n":"1.0.0" | ||
}, | ||
"installPaths":{ | ||
"cbvalidation":"modules\\cbvalidation", | ||
"cborm":"modules\\cborm", | ||
"cbmessagebox":"modules\\cbmessagebox", | ||
"cbi18n":"modules\\cbi18n" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,119 +1,79 @@ | ||
<cfcomponent output="false" hint="My App Configuration"> | ||
<cfscript> | ||
/** | ||
structures to create for configuration | ||
- coldbox | ||
- settings | ||
- conventions | ||
- environments | ||
- ioc | ||
- models DEPRECATED use wirebox instead | ||
- wirebox | ||
- debugger | ||
- mailSettings | ||
- i18n | ||
- webservices | ||
- datasources | ||
- layoutSettings | ||
- layouts | ||
- cacheEngine | ||
- interceptorSettings | ||
- interceptors | ||
- modules | ||
Available objects in variable scope | ||
- controller | ||
- logBoxConfig | ||
- appMapping (auto calculated by ColdBox) | ||
Required Methods | ||
- configure() : The method ColdBox calls to configure the application. | ||
Optional Methods | ||
- detectEnvironment() : If declared the framework will call it and it must return the name of the environment you are on. | ||
- {environment}() : The name of the environment found and called by the framework. | ||
*/ | ||
|
||
// Configure ColdBox Application | ||
function configure(){ | ||
|
||
// coldbox directives | ||
coldbox = { | ||
//Application Setup | ||
appName = "Validation Sample", | ||
|
||
//Development Settings | ||
debugMode = false, | ||
debugPassword = "", | ||
reinitPassword = "", | ||
handlersIndexAutoReload = true, | ||
|
||
//Implicit Events | ||
defaultEvent = "dashboard.index", | ||
requestStartHandler = "", | ||
requestEndHandler = "", | ||
applicationStartHandler = "", | ||
applicationEndHandler = "", | ||
sessionStartHandler = "", | ||
sessionEndHandler = "", | ||
missingTemplateHandler = "", | ||
|
||
//Error/Exception Handling | ||
exceptionHandler = "", | ||
onInvalidEvent = "", | ||
customErrorTemplate = "", | ||
|
||
//Application Aspects | ||
handlerCaching = false, | ||
eventCaching = false | ||
}; | ||
|
||
// global settings - if you wanted to you could move these to environment specific settings | ||
settings = { | ||
}; | ||
|
||
// environment settings, create a detectEnvironment() method to detect it yourself. | ||
// create a function with the name of the environment so it can be executed if that environment is detected | ||
// the value of the environment is a list of regex patterns to match the cgi.http_host. | ||
environments = { | ||
development = "^cf9.,^railo." | ||
}; | ||
|
||
//i18n & Localization | ||
i18n = { | ||
defaultResourceBundle = "includes/i18n/main", | ||
defaultLocale = "en_US", | ||
localeStorage = "cookie", | ||
unknownTranslation = "**NOT FOUND**" | ||
}; | ||
|
||
//Layout Settings | ||
layoutSettings = { | ||
defaultLayout = "Layout.Main.cfm" | ||
}; | ||
|
||
//Register interceptors as an array, we need order | ||
interceptors = [ | ||
//SES | ||
{class="coldbox.system.interceptors.SES"} | ||
]; | ||
|
||
// validation | ||
validation = { | ||
sharedConstraints = { | ||
userForm = { | ||
username = {required=true, size="3..20"}, | ||
password = {required=true, size="6..20"} | ||
component { | ||
|
||
// Configure ColdBox Application | ||
function configure(){ | ||
|
||
// coldbox directives | ||
coldbox = { | ||
//Application Setup | ||
appName = "Validation Sample", | ||
|
||
//Development Settings | ||
debugMode = false, | ||
debugPassword = "", | ||
reinitPassword = "", | ||
handlersIndexAutoReload = true, | ||
|
||
//Implicit Events | ||
defaultEvent = "dashboard.index", | ||
requestStartHandler = "", | ||
requestEndHandler = "", | ||
applicationStartHandler = "", | ||
applicationEndHandler = "", | ||
sessionStartHandler = "", | ||
sessionEndHandler = "", | ||
missingTemplateHandler = "", | ||
|
||
//Error/Exception Handling | ||
exceptionHandler = "", | ||
onInvalidEvent = "", | ||
customErrorTemplate = "/coldbox/system/includes/BugReport.cfm", | ||
|
||
//Application Aspects | ||
handlerCaching = false, | ||
eventCaching = false | ||
}; | ||
|
||
// global settings - if you wanted to you could move these to environment specific settings | ||
settings = { | ||
}; | ||
|
||
// environment settings, create a detectEnvironment() method to detect it yourself. | ||
// create a function with the name of the environment so it can be executed if that environment is detected | ||
// the value of the environment is a list of regex patterns to match the cgi.http_host. | ||
environments = { | ||
development = "^cf9.,^railo." | ||
}; | ||
|
||
//i18n & Localization | ||
i18n = { | ||
defaultResourceBundle = "includes/i18n/main", | ||
defaultLocale = "en_US", | ||
localeStorage = "cookie", | ||
unknownTranslation = "**NOT FOUND**" | ||
}; | ||
|
||
|
||
//Register interceptors as an array, we need order | ||
interceptors = [ | ||
//SES | ||
{class="coldbox.system.interceptors.SES"} | ||
]; | ||
|
||
// validation | ||
validation = { | ||
sharedConstraints = { | ||
userForm = { | ||
username = {required=true, size="3..20"}, | ||
password = {required=true, size="6..20"} | ||
} | ||
} | ||
} | ||
}; | ||
|
||
} | ||
|
||
function development(){ | ||
//wirebox.singletonReload = true; | ||
} | ||
|
||
</cfscript> | ||
</cfcomponent> | ||
}; | ||
|
||
} | ||
|
||
function development(){ | ||
//wirebox.singletonReload = true; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
This is a simple ORM application that uses the cbvalidation module | ||
|
||
To install: | ||
|
||
- Create an empty database called validationSample | ||
- Create a data source called "validationSample" in the CF Admin that points to it | ||
- Run the app. | ||
|
||
The database tables should be created the first time it is run. Try managing the data in the app to test the validation rules. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 15 additions & 15 deletions
30
...ns/Validation/model/ValidationService.cfc → ...s/Validation/models/ValidationService.cfc
100755 → 100644
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
/** | ||
* I am a new Model Object | ||
*/ | ||
component singleton{ | ||
|
||
validationService function init(){ | ||
return this; | ||
} | ||
|
||
struct function getUserForm(){ | ||
return { | ||
username = {required=true, size="5..10"}, | ||
password = {required=true, size="5..10"} | ||
/** | ||
* I am a new Model Object | ||
*/ | ||
component singleton{ | ||
|
||
validationService function init(){ | ||
return this; | ||
} | ||
|
||
struct function getUserForm(){ | ||
return { | ||
username = {required=true, size="5..10"}, | ||
password = {required=true, size="5..10"} | ||
}; | ||
} | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...dation/model/category/CategoryService.cfc → ...ation/models/category/CategoryService.cfc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...lidation/model/product/ProductService.cfc → ...idation/models/product/ProductService.cfc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.