Advertisement
Guest User

Untitled

a guest
Feb 26th, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. SchUser=new SimpleSchema({
  2. Nome: {
  3. type: String
  4. },
  5. Cognome: {
  6. type: String
  7. },
  8. Telefono: {
  9. type: String,
  10. autoform: {
  11. type: 'tel'
  12. }
  13. },
  14. Email: {
  15. type: String,
  16. autoform: {
  17. type: 'email'
  18. }
  19. },
  20. Password: {
  21. type: String,
  22. min: 6,
  23. max: 50,
  24. autoform: {
  25. type: 'password'
  26. },
  27. optional:true
  28. },
  29. ConfPassword: {
  30. type: String,
  31. min: 6,
  32. max: 50,
  33. autoform: {
  34. type: 'password',
  35. label: 'Conferma Password'
  36. },
  37. optional:true,
  38. custom: function(){
  39. if(this.value!="" && this.field('Password').value!=""){
  40. if (this.value !== this.field('Password').value) {
  41. return 'noMatch';
  42. }
  43. }
  44. }
  45. },
  46. permissions: {
  47. type: [String],
  48. label: "Permessi",
  49. minCount:1,
  50. autoform:{
  51. type:"select-checkbox",
  52. options:{
  53. "value":"label",
  54. [...]
  55. }
  56. }
  57. }
  58. });
  59.  
  60. SchStaff.messages({
  61. noMatch: "Password mismatch",
  62. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement