Advertisement
Guest User

Untitled

a guest
Nov 28th, 2016
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. export default class UserResource {
  2.     get() {
  3.         this.send(['zenek', 'zdzisiu', 'zoltan']);
  4.     }
  5.  
  6.     post(request) {
  7.         var data = request.data;
  8.         this.send(data);
  9.     }
  10.  
  11.     static post() {
  12.         return {
  13.             validator: {
  14.                 username: {
  15.                     presence: true,
  16.                     exclusion: {
  17.                         within: ["dupa"],
  18.                         message: "'%{value}' is not allowed"
  19.                     }
  20.                 },
  21.                 password: {
  22.                     presence: true,
  23.                     length: {
  24.                         minimum: 6,
  25.                         message: "must be at least 6 characters"
  26.                     }
  27.                 }
  28.             },
  29.             allow: '*'
  30.         };
  31.     }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement