formFields.js 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. export const logInForm = {
  2. form: {
  3. email: {
  4. id: 1,
  5. name: "email",
  6. type: "email",
  7. label: "Email",
  8. validation: {
  9. requred: {
  10. cb: (v) => v.trim() === ''
  11. }
  12. },
  13. fail: false,
  14. touch: false,
  15. value: ""
  16. },
  17. password: {
  18. id: 2,
  19. name: "password",
  20. type: "password",
  21. label: "Password",
  22. validation: {
  23. requred: {
  24. cb: (v) => v.trim() === '',
  25. },
  26. minL: {
  27. cb: (v) => v.trim().length < 6
  28. }
  29. },
  30. fail: false,
  31. touch: false,
  32. value: ""
  33. }
  34. },
  35. validForm: false
  36. };
  37. export const signUpForm = {
  38. form: {
  39. email: {
  40. id: 1,
  41. name: "email",
  42. type: "email",
  43. label: "Email",
  44. validation: {
  45. requred: {
  46. cb: (v) => v.trim() === ''
  47. }
  48. },
  49. fail: false,
  50. touch: false,
  51. value: ""
  52. },
  53. firstName: {
  54. id: 2,
  55. type: "text",
  56. name: "firstName",
  57. label: "First Name",
  58. validation: {
  59. requred: {
  60. cb: (v) => v.trim() === ''
  61. }
  62. },
  63. fail: false,
  64. touch: false,
  65. value: ""
  66. },
  67. lastName: {
  68. id: 3,
  69. type: "text",
  70. name: "lastName",
  71. label: "First Name",
  72. validation: {
  73. requred: {
  74. cb: (v) => v.trim() === ''
  75. }
  76. },
  77. fail: false,
  78. touch: false,
  79. value: ""
  80. },
  81. password: {
  82. id: 4,
  83. name: "password",
  84. type: "password",
  85. label: "Password",
  86. validation: {
  87. requred: {
  88. cb: (v) => v.trim() === '',
  89. },
  90. minL: {
  91. cb: (v) => v.trim().length < 6
  92. }
  93. },
  94. fail: false,
  95. touch: false,
  96. value: ""
  97. },
  98. confirmPassword: {
  99. id: 5,
  100. name: "confirmPassword",
  101. type: "password",
  102. label: "Confirm Password",
  103. validation: {
  104. requred: {
  105. cb: (v) => v.trim() === '',
  106. },
  107. minL: {
  108. cb: (v) => v.trim().length < 6
  109. },
  110. match: {
  111. match: "password",
  112. cb: (v, m) => v !== m,
  113. }
  114. },
  115. fail: false,
  116. touch: false,
  117. value: ""
  118. }
  119. },
  120. validForm: false
  121. };