I’m using Meredydd’s Validator
package to add form validation to the tutorial News Aggregator
app as I learn along with that tutorial. Validating the various text boxes was simple, but it was tricky to validate that a file was uploaded. This was due to the fact that self.item
within the ArticleEdit
component does not seem to have access to the uploaded file from the FileLoader
when the file has changed, even though the validator can see it just fine, and all other properties are easily accessed. It feels like I’m missing something, and there should be an easier way to do this. I would have liked to have done this kind of validation using the alert’s buttons from within the Homepage
component, but I wasn’t sure how to trigger the validation function on the called component’s data. Is there something I’m misunderstanding about how all this works? (Note that this is distinctly possible as I’m new to the platform.)
https://anvil.works/build#clone:XGYSMXOID4VRXKJP=QDG2G7L636GV7G7EBQREXTJE