Fix code errors
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
63dfbb2127
commit
a6458745bd
|
@ -44,7 +44,7 @@
|
|||
|
||||
var placeholder = 'Mozilla/5.0 User Agent';
|
||||
|
||||
if (check['operator'] === 'matches' || check['operator'] === '!matches') {
|
||||
if (check.operator === 'matches' || check.operator === '!matches') {
|
||||
placeholder = '/^Mozilla\\/5\\.0 (.*)$/i';
|
||||
}
|
||||
|
||||
|
@ -56,8 +56,8 @@
|
|||
placement: 'bottom'
|
||||
});
|
||||
|
||||
if (check['operator'] === 'matches' || check['operator'] === '!matches') {
|
||||
if (this._validateRegex(check['value'])) {
|
||||
if (check.operator === 'matches' || check.operator === '!matches') {
|
||||
if (this._validateRegex(check.value)) {
|
||||
$(element).removeClass('invalid-input');
|
||||
} else {
|
||||
$(element).addClass('invalid-input');
|
||||
|
@ -74,17 +74,17 @@
|
|||
]
|
||||
}
|
||||
];
|
||||
if (this.predefinedValues.indexOf(check['value']) === -1) {
|
||||
if (this.predefinedValues.indexOf(check.value) === -1) {
|
||||
data.unshift({
|
||||
id: check['value'],
|
||||
text: check['value']
|
||||
})
|
||||
id: check.value,
|
||||
text: check.value
|
||||
});
|
||||
}
|
||||
|
||||
$(element).select2({
|
||||
data: data,
|
||||
createSearchChoice: function(term) {
|
||||
if (self.predefinedValues.indexOf(check['value']) === -1) {
|
||||
if (self.predefinedValues.indexOf(check.value) === -1) {
|
||||
return {
|
||||
id: term,
|
||||
text: term
|
||||
|
|
Loading…
Reference in New Issue