Skip to content

Instantly share code, notes, and snippets.

@anhnt
Created December 14, 2016 04:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anhnt/54f7d877415f902f3ff8e4d1024fd627 to your computer and use it in GitHub Desktop.
Save anhnt/54f7d877415f902f3ff8e4d1024fd627 to your computer and use it in GitHub Desktop.
<script>
/**
* Show error message
* @param {jQuery} form
* @param {Object} config
* @param {String|Array} message
*/
function showErrorMessage(form, config, message) {
config = getFormConfig(form, config);
var messageHtml = config.renderErrorMessage(message);
showFormMessage(form, config, messageHtml, 'Opps', 'danger', null);
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment