diff --git a/UI/jQuery/Validation.js b/UI/jQuery/Validation.js
deleted file mode 100644
index 04ad8727e..000000000
--- a/UI/jQuery/Validation.js
+++ /dev/null
@@ -1,30 +0,0 @@
-define(
- [
- 'jquery'
- ], function ($) {
- 'use strict';
-
- $.fn.addBootstrapError = function (error) {
- var input = this.find('[name]').filter(function () {
- return this.name.toLowerCase() === error.propertyName.toLowerCase();
- });
-
- var controlGroup = input.parents('.control-group');
- if (controlGroup.find('.help-inline').length === 0) {
- controlGroup.find('.controls').append('
' + error.errorMessage + '');
- }
-
- controlGroup.addClass('error');
-
- return controlGroup.find('.help-inline').text();
- };
-
-
- $.fn.removeBootstrapError = function () {
-
- this.removeClass('error');
-
- return this.parents('.control-group').find('.help-inline.error-message').remove();
- };
-
- });
diff --git a/UI/jQuery/jquery.validation.js b/UI/jQuery/jquery.validation.js
new file mode 100644
index 000000000..fda5087c5
--- /dev/null
+++ b/UI/jQuery/jquery.validation.js
@@ -0,0 +1,52 @@
+define(
+ [
+ 'jquery'
+ ], function ($) {
+ 'use strict';
+
+ $.fn.processServerError = function (error) {
+
+ var validationName = error.propertyName.toLowerCase();
+
+ var input = this.find('[name]').filter(function () {
+ return this.name.toLowerCase() === validationName;
+ });
+
+
+ if (input.length === 0) {
+ input = this.find('[validation-name]').filter(function () {
+ return $(this).attr('validation-name').toLowerCase() === validationName;
+ });
+
+ //still not found?
+ if (input.length === 0) {
+ this.addFormError(error);
+ console.error('couldn\'t find input for ' + error.propertyName);
+ return this;
+ }
+ }
+
+ var controlGroup = input.parents('.control-group');
+ controlGroup.find('.controls').append('
' + error.errorMessage + '');
+
+ controlGroup.addClass('error');
+
+ return controlGroup.find('.help-inline').text();
+ };
+
+
+ $.fn.processClientError = function (error) {
+
+ };
+
+ $.fn.addFormError = function (error) {
+ this.find('.control-group').parent().prepend('
'+ error.errorMessage +'
')
+ };
+
+ $.fn.removeAllErrors = function () {
+ this.find('.error').removeClass('error');
+ this.find('.validation-error').remove();
+ return this.find('.help-inline.error-message').remove();
+ };
+
+ });