You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the interface for an invalid message object is neither defined nor exported. The invalid message object is part of the definition of Validity found at https://github.com/dojo/widgets/blob/master/src/form/middleware.ts#L4 however, more times than not, projects have to write their own interfaces for { valid: boolean, message: string }. Perhaps we could define and export a new interface for this with the name InvalidMessage
Package Version: 7.0.3
The text was updated successfully, but these errors were encountered:
I don't think we should be exporting this interface. Perhaps we should instead change to always export the same object with a valid boolean and optional message. This needs investigating further.
@tomdye you mean change the invalid type on the widgets to only be { valid: boolean, message: string } and not { valid: boolean, message: string } | true that would certainly lessen alot of logic that has to go in to handle two different types
Correct, I'm not sure why it was done that way in the first place. I'm just thinking out loud here though - would this approach work for all our validated widgets?
I think so, I'm also not sure why it's currently { valid: boolean, message: string } | true, it seems to really complicate the logic for not alot of gain
Enhancement
Currently the interface for an invalid message object is neither defined nor exported. The invalid message object is part of the definition of
Validity
found at https://github.com/dojo/widgets/blob/master/src/form/middleware.ts#L4 however, more times than not, projects have to write their own interfaces for{ valid: boolean, message: string }
. Perhaps we could define and export a new interface for this with the nameInvalidMessage
Package Version: 7.0.3
The text was updated successfully, but these errors were encountered: