PageSourceSearch

https://softwarecrafts.uk/_next/static/chunks/pages/100-words/day-219-b4e075263a5c95a1.js

js softwarecrafts.uk collected 2026-10-01 14:05:28 UTC 1,874 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8182],{87006:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/100-words/day-219",function(){return n(90912)}])},90912:function(e,t,n){"use strict";n.r(t),n.d(t,{meta:function(){return s}});var i=n(85893),a=n(11151),o=n(53841);let s={author:"Andrew Miller",date:"2024-11-11",title:"Soft validation in Django forms",description:"How is this going to work...",tags:["100 words","django","forms","validation"]},MDXLayout=e=>(0,i.jsx)(o.B,Object.assign({meta:s},e));function _createMdxContent(e){let t=Object.assign({p:"p"},(0,a.ah)(),e.components);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.p,{children:"This week I need to implement a new feature for a client. The client allows users to add recipients to their platform and when doing so under certain conditions we need to make a call out to a third-party API, which may return some warnings."}),"\n",(0,i.jsx)(t.p,{children:"What's interesting here is that the page is already setup with a Django Form and works well, however these new warnings which come back are what I would term 'soft' validation fails, a user can choose to ignore them and proceed to add a recipient. That said Django only has two possible validation states for a form (valid and invalid), so adding a third state is going to be an interesting problem to solve. Initially I'm thinking maybe some state in the session to acknowledge bypassing some of the validation."}),"\n",(0,i.jsx)(t.p,{children:"Have you encountered a similar issue? I'm interested if you have ever encountered a similar thing. Later this week I will share the solution I come up with!"})]})}t.default=function(e={}){return(0,i.jsx)(MDXLayout,Object.assign({},e,{children:(0,i.jsx)(_createMdxContent,e)}))}}},function(e){e.O(0,[407,8819,4825,9774,2888,179],function(){return e(e.s=87006)}),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.