   form =
     name: "form"
     action: "/"
+    dependencies: [
+      type: 'validator'
+      module: 'TestModule'
+      factory: 'testFactory'
+      name: 'testValidator'
+      ]
     pages: [
       lines:[
         fields:[
-          name: "field1"
-          type: "text",
-          label: "field 1"
-          validation: [
-            validator:"email"
-            options: [
-              message: "not an email"
+          {
+            name: "field1"
+            type: "text",
+            label: "field 1"
+            validation: [
+              validator:"email"
+              options: [
+                message: "not an email"
+                ]
               ]
-            ]
+            },
+          {
+            name: "field2",
+            type: "text",
+            label: "field 2",
+            validation: [
+              validator:"testValidator",
+              options: [
+                message: "test validation failed"
+                ]
+              ]
+            }
           ]
         ]
       ]
+
+  
+  testFactoryInit = false
+  angular.module('TestModule', []).factory('testFactory', ->
+    validator = (name, values, rule) ->
+      if values[name]? and values[name] == 'test' then return true
+      return false
+    return {
+      validator: validator
+      init: (name, rule, services) ->
+        testFactoryInit = true
+    }
+  )
 
   formSend = false
   angular.module('CoolFormServices').factory('networkService', ->

    expect(fieldValue).toEqual true
    changeValue(42)
    expect(fieldValue).toEqual 42
    
    expect(fieldError).toEqual false
    service.validateField('field1')
    expect(fieldError).toEqual true

      }
    )

  it 'should deal wtih a value', inject((registrationService) ->
        
    service = registrationService(form)
    changeValue = service.registerField('field1', null)
