Package Exports
- js-model-validation
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (js-model-validation) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
js-model-valiation
a Js Model Validation v0.0.11 application
How to use:
columns
[{
name: 'columns name',
type: 'column type', default set to 'string' -> [string, email, number, date, json, array]
validation: {
required: true, -> true or false (false will ignore all the validation for the column)
message: '[column] is required.',
min: 0, string or number column allowed input, default 0 when required set to true
max: 50, string or number column allowed input, default 'max'
rangmessage: 'min 3 and max 20', only display when min, max or min and max values are provided
},
nesteditems: false, default set to false, when set to true 'validationitems' need to set
and for this 'name', 'type', validation and other attribute ignored.
validationitems: [
name: 'column name',
type: 'column type',
.....
]
}]
config -> config is optional
showAllMessage: boolean -> default set to false {
true: Display all the error messages.
false: Display first found error messages.
}
req or validation data