         if value.length > 0 then value else null
 
     issueNotice: (validate, speed) ->
-        that = $ @
-        lengthNotice = that.nextUntil ':input', "p.form-length-notice"
-        notice = that.nextUntil ':input', "p.form-#{validate.status}-notice:contains(#{validate.message})"
+        _that = $ @
+        lengthNotice = _that.nextUntil ':input', "p.form-length-notice"
+        notice = _that.nextUntil ':input', "p.form-#{validate.status}-notice:contains(#{validate.message})"
 
         _addNotice = (item) ->
-            if that.css('float') isnt 'none'
-                noticeHolder = that.parent 'div.form-notice-holder'
-                if noticeHolder.length is 0
-                    that.wrap('<div class="form-notice-holder"></div>').focus()
-                    noticeHolder = that.parent 'div.form-notice-holder'
-                    item.hide().appendTo(noticeHolder).slideDown speed
+            if _that.css('float') isnt 'none'
+                _noticeHolder = _that.parent 'div.form-notice-holder'
+                if _noticeHolder.length is 0
+                    _that.wrap('<div class="form-notice-holder"></div>').focus()
+                    _noticeHolder = _that.parent 'div.form-notice-holder'
+                    item.hide().appendTo(_noticeHolder).slideDown speed
                 else
-                    item.hide().appendTo(noticeHolder).slideDown speed
-                noticeHolder.children().css 'float', 'none'
-            else
-                item.hide().insertAfter(that).slideDown speed
+                    item.hide().appendTo(_noticeHolder).slideDown speed
+                _noticeHolder.children().css 'float', 'none'
+            else
+                item.hide().insertAfter(_that).slideDown speed
         
         if validate.status is 'length' and lengthNotice.length is 0
             notice = $ '<p></p>',

            _evaluate equal, value

    validateNotEqual: (value) ->
        that = $ @
        notEqual = that.data 'not-equal'
        validate =
            status: null
            message: null

                self.removeValidationClass.call @
                self.removeAllNotices.call @, self.speed
        
        body.on 'change', ':input[data-required-with]', ->
            # need to monitor required field also
            requireFieldId = $(@).data 'required-with'

            if requireFieldId.search(':') isnt -1
                requireFieldId = requireFieldId.split ':'
                fieldId = requireFieldId[0]
            else
                fieldId = requireFieldId
            
            requireField = $ "##{fieldId}"
            validate = self.validateRequiredWith.call @
            # issue and remove notices on both fields
            if validate?
                if validate.message?
                    self.issueNotice.call @, validate, self.speed
                    self.issueNotice.call requireField, validate, self.speed
                else
                    self.removeNotice.call @, validate.issuer, self.speed
                    self.removeNotice.call requireField, validate.issuer, self.speed
                self.removeValidationClass.call @, validate.status
                self.applyValidationClass.call @, validate.status
                self.removeValidationClass.call requireField, validate.status
                self.applyValidationClass.call requireField, validate.status
        
        body.on 'blur', ':input[data-require-with]', ->
            # need to monitor required field also            
            requiredFieldId = $(@).data 'require-with'

            if requiredFieldId.search(':') isnt -1
                requiredFieldId = requiredFieldId.split ':'
                fieldId = requiredFieldId[0]
            else
                fieldId = requiredFieldId

            requiredField = $ "##{fieldId}"
            validate = self.validateRequiredWith.call @
            # issue and remove notices on both fields
            if validate?
                if validate.message?
                    self.issueNotice.call @, validate, self.speed
                    self.issueNotice.call requiredField, validate, self.speed
                else
                    self.removeNotice.call @, validate.issuer, self.speed
                    self.removeNotice.call requiredField, validate.issuer, self.speed
                self.removeValidationClass.call @, validate.status
                self.applyValidationClass.call @, validate.status
                self.removeValidationClass.call requiredField, validate.status
                self.applyValidationClass.call requiredField, validate.status
        
        body.on 'change', ':input[data-allowed-with]', ->
            # remove disabled attribute on related field
            value = self.getValue.call @
            self.validateAllowedWith.call @, value

    trackLength: (value) ->
        _that = $ @
        validate =
            status: 'length'
            message: null
            issuer: 'length-notice'
        if value?
            _length = value.length
            validate.message = if _length is 1 then "#{_length} character" else "#{_length} characters"
        validate

    getValue: ->
