File tree Expand file tree Collapse file tree 10 files changed +20
-19
lines changed
packages/core/src/fields/types Expand file tree Collapse file tree 10 files changed +20
-19
lines changed Original file line number Diff line number Diff line change @@ -128,7 +128,8 @@ export function bigInt <ListTypeInfo extends BaseListTypeInfo> (config: BigIntFi
128128 ...config . hooks ,
129129 validate : {
130130 ...config . hooks ?. validate ,
131- create : merge ( config . hooks ?. validate ?. create , validate ) ,
131+ create : merge ( validate , config . hooks ?. validate ?. create ) ,
132+ update : merge ( validate , config . hooks ?. validate ?. update ) ,
132133 }
133134 } ,
134135 input : {
Original file line number Diff line number Diff line change @@ -78,8 +78,8 @@ export function calendarDay <ListTypeInfo extends BaseListTypeInfo> (config: Cal
7878 ...config . hooks ,
7979 validate : {
8080 ...config . hooks ?. validate ,
81- create : merge ( config . hooks ?. validate ?. create , validate ) ,
82- update : merge ( config . hooks ?. validate ?. update , validate ) ,
81+ create : merge ( validate , config . hooks ?. validate ?. create ) ,
82+ update : merge ( validate , config . hooks ?. validate ?. update ) ,
8383 } ,
8484 } ,
8585 input : {
Original file line number Diff line number Diff line change @@ -138,8 +138,8 @@ export function decimal <ListTypeInfo extends BaseListTypeInfo> (config: Decimal
138138 ...config . hooks ,
139139 validate : {
140140 ...config . hooks ?. validate ,
141- create : merge ( config . hooks ?. validate ?. create , validate ) ,
142- update : merge ( config . hooks ?. validate ?. update , validate ) ,
141+ create : merge ( validate , config . hooks ?. validate ?. create ) ,
142+ update : merge ( validate , config . hooks ?. validate ?. update ) ,
143143 } ,
144144 } ,
145145 input : {
Original file line number Diff line number Diff line change @@ -91,8 +91,8 @@ export function float <ListTypeInfo extends BaseListTypeInfo> (config: FloatFiel
9191 ...config . hooks ,
9292 validate : {
9393 ...config . hooks ?. validate ,
94- create : merge ( config . hooks ?. validate ?. create , validate ) ,
95- update : merge ( config . hooks ?. validate ?. update , validate ) ,
94+ create : merge ( validate , config . hooks ?. validate ?. create ) ,
95+ update : merge ( validate , config . hooks ?. validate ?. update ) ,
9696 } ,
9797 } ,
9898 input : {
Original file line number Diff line number Diff line change @@ -125,8 +125,8 @@ export function integer <ListTypeInfo extends BaseListTypeInfo> (config: Integer
125125 ...config . hooks ,
126126 validate : {
127127 ...config . hooks ?. validate ,
128- create : merge ( config . hooks ?. validate ?. create , validate ) ,
129- update : merge ( config . hooks ?. validate ?. update , validate ) ,
128+ create : merge ( validate , config . hooks ?. validate ?. create ) ,
129+ update : merge ( validate , config . hooks ?. validate ?. update ) ,
130130 } ,
131131 } ,
132132 input : {
Original file line number Diff line number Diff line change @@ -112,8 +112,8 @@ export function multiselect <ListTypeInfo extends BaseListTypeInfo> (
112112 ...config . hooks ,
113113 validate : {
114114 ...config . hooks ?. validate ,
115- create : merge ( config . hooks ?. validate ?. create , validate ) ,
116- update : merge ( config . hooks ?. validate ?. update , validate ) ,
115+ create : merge ( validate , config . hooks ?. validate ?. create ) ,
116+ update : merge ( validate , config . hooks ?. validate ?. update ) ,
117117 } ,
118118 } ,
119119 views : '@keystone-6/core/fields/types/multiselect/views' ,
Original file line number Diff line number Diff line change @@ -141,8 +141,8 @@ export function password <ListTypeInfo extends BaseListTypeInfo> (config: Passwo
141141 ...config . hooks ,
142142 validate : {
143143 ...config . hooks ?. validate ,
144- create : merge ( config . hooks ?. validate ?. create , validate ) ,
145- update : merge ( config . hooks ?. validate ?. update , validate ) ,
144+ create : merge ( validate , config . hooks ?. validate ?. create ) ,
145+ update : merge ( validate , config . hooks ?. validate ?. update ) ,
146146 } ,
147147 } ,
148148 input : {
Original file line number Diff line number Diff line change @@ -99,8 +99,8 @@ export function select <ListTypeInfo extends BaseListTypeInfo> (config: SelectFi
9999 ...config . hooks ,
100100 validate : {
101101 ...config . hooks ?. validate ,
102- create : merge ( config . hooks ?. validate ?. create , validate ) ,
103- update : merge ( config . hooks ?. validate ?. update , validate ) ,
102+ create : merge ( validate , config . hooks ?. validate ?. create ) ,
103+ update : merge ( validate , config . hooks ?. validate ?. update ) ,
104104 } ,
105105 } ,
106106 __ksTelemetryFieldTypeName : '@keystone-6/select' ,
Original file line number Diff line number Diff line change @@ -146,8 +146,8 @@ export function text <ListTypeInfo extends BaseListTypeInfo> (
146146 ...config . hooks ,
147147 validate : {
148148 ...config . hooks ?. validate ,
149- create : merge ( config . hooks ?. validate ?. create , validate ) ,
150- update : merge ( config . hooks ?. validate ?. update , validate ) ,
149+ create : merge ( validate , config . hooks ?. validate ?. create ) ,
150+ update : merge ( validate , config . hooks ?. validate ?. update ) ,
151151 } ,
152152 } ,
153153 input : {
Original file line number Diff line number Diff line change @@ -77,8 +77,8 @@ export function timestamp <ListTypeInfo extends BaseListTypeInfo> (
7777 ...config . hooks ,
7878 validate : {
7979 ...config . hooks ?. validate ,
80- create : merge ( config . hooks ?. validate ?. create , validate ) ,
81- update : merge ( config . hooks ?. validate ?. update , validate ) ,
80+ create : merge ( validate , config . hooks ?. validate ?. create ) ,
81+ update : merge ( validate , config . hooks ?. validate ?. update ) ,
8282 } ,
8383 } ,
8484 input : {
You can’t perform that action at this time.
0 commit comments