1
1
/**
2
- * *******************************************************************************
3
- Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp
4
- www.coldbox.org | www.luismajano.com | www.ortussolutions.com
5
- * *******************************************************************************
6
- The ColdBox validation manager interface, all inspired by awesome Hyrule Validation Framework by Dan Vega
7
- */
2
+ * *******************************************************************************
3
+ * Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp
4
+ * www.ortussolutions.com
5
+ * *******************************************************************************
6
+ * The ColdBox validation manager interface, all inspired by awesome Hyrule Validation Framework by Dan Vega
7
+ */
8
8
import cbvalidation .models .* ;
9
9
import cbvalidation .models .result .* ;
10
10
interface {
11
11
12
12
/**
13
- * Validate an object
14
- * @targetThe target object to validate
15
- * @fieldsOne or more fields to validate on, by default it validates all fields in the constraints. This can be a simple list or an array.
16
- * @constraintsAn optional shared constraints name or an actual structure of constraints to validate on.
17
- * @localeAn optional locale to use for i18n messages
18
- * @excludeFieldsAn optional list of fields to exclude from the validation.
19
- * @includeFieldsAn optional list of fields to include in the validation.
20
- */
21
- IValidationResult function validate ( required any target , string fields , any constraints , string locale = " " , string excludeFields = " " , string includeFields = " " );
13
+ * Validate an object
14
+ *
15
+ * @targetThe target object to validate
16
+ * @fieldsOne or more fields to validate on, by default it validates all fields in the constraints. This can be a simple list or an array.
17
+ * @constraintsAn optional shared constraints name or an actual structure of constraints to validate on.
18
+ * @localeAn optional locale to use for i18n messages
19
+ * @excludeFieldsAn optional list of fields to exclude from the validation.
20
+ * @includeFieldsAn optional list of fields to include in the validation.
21
+ *
22
+ * @result ValidationResult object
23
+ */
24
+ IValidationResult function validate (
25
+ required any target ,
26
+ string fields ,
27
+ any constraints ,
28
+ string locale = " " ,
29
+ string excludeFields = " " ,
30
+ string includeFields = " "
31
+ );
22
32
23
33
/**
24
- * Retrieve the shared constraints
25
- * @nameFilter by name or not
26
- */
34
+ * Retrieve the shared constraints
35
+ *
36
+ * @nameFilter by name or not
37
+ */
27
38
struct function getSharedConstraints ( string name );
28
39
29
40
/**
30
- * Check if a shared constraint exists by name
31
- * @nameThe shared constraint to check
32
- */
41
+ * Check if a shared constraint exists by name
42
+ *
43
+ * @nameThe shared constraint to check
44
+ */
33
45
boolean function sharedConstraintsExists ( required string name );
34
46
35
47
/**
36
- * Set the shared constraints into the validation manager, usually these are described in the ColdBox configuraiton file
37
- * @constraintsFilter by name or not
38
- */
48
+ * Set the shared constraints into the validation manager, usually these are described in the ColdBox configuraiton file
49
+ *
50
+ * @constraintsFilter by name or not
51
+ */
39
52
IValidationManager function setSharedConstraints ( struct constraints );
40
53
41
54
/**
42
- * Store a shared constraint
43
- * @nameFilter by name or not
44
- * @constraintThe constraint to store.
45
- */
55
+ * Store a shared constraint
56
+ *
57
+ * @nameFilter by name or not
58
+ * @constraintThe constraint to store.
59
+ */
46
60
IValidationManager function addSharedConstraint ( required string name , required struct constraint );
47
61
}
0 commit comments