             label:     if @props.unlabeled then false else label
             value:     value
             onKeyDown: @handleKeyDown if @props.onEnter
-            onChange:  @handleChange
-        }, @props)
+            onChange:  @validatedChangeHandler
+        }, @props, {value: value})
         if @props.inputOnly then @renderPlain(props) else @renderStyled(props, label)
 
     renderPlain: (props) ->

    handleKeyDown: (ev) ->
        @props.onEnter() if ev.key is 'Enter'

    renderEdit: (label) ->
        value = @_getValue() or ''
        label ||= @props.label or _.field2title(@props.name)
        props = _.extend({
            ref:       'input'

class Lanes.Components.Input extends Lanes.React.Component

    NUMBER_TEST: /^-?\d+(\.\d+)?$/

    mixins: [
        Lanes.Components.Form.FieldMixin
    ]

    propTypes:
        unlabled:  React.PropTypes.bool
        onlyNumeric: React.PropTypes.bool

    getDefaultProps: ->
        type: 'text'

    getValue: ->
        @refs.input.getValue()
