Skip to content

Commit 4299599

Browse files
committed
feat: Add more checkout field constraints
1 parent 499cea1 commit 4299599

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

enterprise_access/apps/bffs/checkout/handlers.py

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,11 +211,29 @@ def _get_field_constraints(self) -> Dict:
211211
return {
212212
'quantity': quantity_constraints,
213213
'enterprise_slug': {
214-
'min_length': 3,
215-
'max_length': 30,
214+
'min_length': 1,
215+
'max_length': 255,
216216
'pattern': '^[a-z0-9-]+$'
217217
},
218-
'embargoed_countries': get_embargoed_countries()
218+
'embargoed_countries': get_embargoed_countries(),
219+
'full_name': {
220+
'min_length': 1,
221+
'max_length': 150,
222+
},
223+
'admin_email': {
224+
'min_length': 6,
225+
'max_length': 253,
226+
'pattern': '^[^\s@]+@[^\s@]+\.[^\s@]+$'
227+
},
228+
'country': {
229+
'min_length': 2,
230+
'max_length': 2,
231+
'pattern': '^[A-Z]+$'
232+
},
233+
'company_name': {
234+
'min_length': 1,
235+
'max_length': 255,
236+
}
219237
}
220238

221239

0 commit comments

Comments
 (0)