This is only possible in the Lema widget.
If you have added custom fields or if you want some custom validation rule for some fields, you can define your own validation rules. The following code shows how.
<script type="text/javascript">
window.rnwWidget = window.rnwWidget || {};
window.rnwWidget.configureWidget = window.rnwWidget.configureWidget || [];
window.rnwWidget.configureWidget.push(function(options) {
options.extend({
custom_fields : {
stored_customer_institution : {
type : 'text',
location : 'before',
reference : 'customer_firstname',
placeholder : 'Institution',
}
},
validationOptions : {
classRules : {
stored_customer_institution : {
required : true,
messages: "My error validation message"
}
}
}
});
});
</script>
The identifier for the class rules has to be the same as the custom field name. Parameters of the rules are from the jquery validation plugin. More information is available under http://jqueryvalidation.org/.
Comments
0 comments
Please sign in to leave a comment.