Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 14th, 2012  |  syntax: JavaScript  |  size: 0.77 KB  |  hits: 23  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. /**
  2.  * Created with JetBrains WebStorm.
  3.  * User: nur
  4.  * Date: 6/14/12
  5.  * Time: 2:50 PM
  6.  * To change this template use File | Settings | File Templates.
  7.  */
  8. var contractForService1 = {
  9.  
  10.     serviceActionName: {
  11.         params: {
  12.             username: {
  13.                 minLength: 3,
  14.                 maxLength: 50,
  15.                 regexp: '/\d+/',
  16.                 otherValidator: 'params'
  17.             }
  18.         },
  19.         response: {
  20.             instanceOf: 'Base.Response',
  21.             email: {
  22.                 regexp: '/blablba/'
  23.             }
  24.  
  25.         }
  26.  
  27.     },
  28.  
  29.     secondServiceActionName: {
  30.         _extend: 'serviceActionName',
  31.         params: {
  32.             oneMoreParams: {
  33.                 instanceOf: 'int'
  34.             }
  35.         }
  36.     }
  37.  
  38. };