validators:VALIDATOR_NAME:message directive for the fields.ini file
Return to fields.ini file
Synopsis
If you want to customize the error message associated with a particular validation rule you can use the validators:VALIDATOR_NAME:message directive in the fields.ini file.
Format
[myfield]
validators:VALIDATOR_NAME:message = MESSAGE
Examples
If you don’t like the default error message that is displayed when you make the first_name field required, you can customize it with your own message. E.g.
[first_name]
validators:required=1
validators:required:message = "Please enter your first name"
See Also
- validators - The fields.ini file directive for adding a validation rule to a field. This directive must be used in conjunction with validators.
- fieldname__validate - For more complex validation rules you can define them in the table delegate class.
- Form Validation - Section in the Getting Started tutorial on form validation.
var disqus_identifier = ‘xataface.com/wiki/validators:VALIDATOR_NAME:message’; (function() { var dsq = document.createElement(‘script’); dsq.type = ‘text/javascript’; dsq.async = true; dsq.src = ‘http://xataface.disqus.com/embed.js’; (document.getElementsByTagName(‘head’)[0] || document.getElementsByTagName(‘body’)[0]).appendChild(dsq); })(); blog comments powered by Disqus
//<![CDATA[ (function() { var links = document.getElementsByTagName(‘a’); var query = ‘?’; for(var i = 0; i < links.length; i++) { if(links[i].href.indexOf(‘#disqus_thread’) >= 0) { query += ‘url’ + i + ‘=’ + encodeURIComponent(links[i].href) + ‘&’; } } document.write(‘