   handleClear: (e) ->
     @setState @getInitialState()  # Restore component's initial UI.
 
-  capitalize: (string) ->
-    string.charAt(0).toUpperCase() + string.slice(1)
-
+  # field validations
   valid: ->
     @validName() && @validVolume() && @validQuantity() &&
     @validRoom() && @validCategory() && @validDescription()
-
-  # validators for individual fields
   validName: ->
     @state.name && @state.name.length <= 50
   validVolume: ->

    room:        ""
    category:    ""
    description: ""

  handleChange: (e) ->
    name = e.target.name

    @state.category && @state.category.length <= 50
  validDescription: ->
    @state.description.length <= 200
  fieldColor: (validator) ->
    if validator then 'has-success' else 'has-warning'

  capitalize: (string) ->
    string.charAt(0).toUpperCase() + string.slice(1)

  render: ->
    R = React.DOM
