Closed nvwieren closed 6 years ago
Hi Nick, I think I see the issue here, but I don't think that removing the errorNode all together is the right way to solve it. I think the issue is in the _handleValidations
method, which should check for validations on just the context object. I will open an issue for this. Next time, when you submit a pull request, can you please include a commit at the very beginning with just the formatting changes? Right now, Github is telling me that you changed about 4k lines in the widget, and the only material change I see is that you removed the error node from the html template. If you do these commits in sequence it's much easier for me to tell what you changed :)
Opened #13
Hi Conner,
The problem is more or less that you deviated from the boilerplate code delivered by Mendix. As such I refactored the validation handling to resemble the boilerplate code style. Also it’s not related to an invalid context object – it triggers on the wrong attributes as your code doesn’t specifically check if the array of validations is actually related to the date attribute configured for the widget.
Good luck.
From: Conner notifications@github.com Sent: woensdag 25 april 2018 15:52 To: cdcharlebois/DatePair DatePair@noreply.github.com Cc: Nick van Wieren nvanwieren@intermediad.nl; Author author@noreply.github.com Subject: Re: [cdcharlebois/DatePair] Refactored validation handling - widget triggered on non-field relate… (#12)
Hi Nick, I think I see the issue here, but I don't think that removing the errorNode all together is the right way to solve it. I think the issue is in the _handleValidations method, which should check for validations on just the context object. I will open an issue for this. Next time, when you submit a pull request, can you please include a commit at the very beginning with just the formatting changes? Right now, Github is telling me that you changed about 4k lines in the widget, and the only material change I see is that you removed the error node from the html template. If you do these commits in sequence it's much easier for me to tell what you changed :)
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/cdcharlebois/DatePair/pull/12#issuecomment-384294205, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ACuQBbBy6y-pvSUsQZytpKsrk57-uu8Mks5tsH9ngaJpZM4TjNB2.
…d validations - applied boilerplate logic for validations