Error validating model even though it is valid
See original GitHub issueI am getting the following error:
“Provided model ( <model name> ) matched but unitialized or may not contain icon. Refer to https://apple.co/2IhJr0Q, https://apple.co/2Nvshvn and documentation to fill the model correctly.”
After investigating a bit, it seems that the logic in pass.js is as follows:
if (!noDynList.length || !noDynList.some(f => f.toLowerCase().includes("icon"))
|| !remoteFilesList.some(f => f.toLowerCase().includes("icon"))) {
let eMessage = formatError("MODEL_UNINITIALIZED", path.parse(this.model).name);
throw new Error(eMessage);
}
This requires me to have an icon both in the noDynList AND the remoteFilesList; surely we only need 1 or the other rather than both?
When I change the code to this it works as I would expect, and I can open the generated pass on my phone:
if (![...noDynList, ...remoteFilesList].some(f => f.toLowerCase().includes("icon"))) {
let eMessage = formatError("MODEL_UNINITIALIZED", path.parse(this.model).name);
throw new Error(eMessage);
}
Is my understanding of the expected behavior here wrong? Is the icon actually needed in both lists for some reason?
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
SQLModel doesn't raise ValidationError · Issue #52 - GitHub
If the model as table=True then validations are disabled, and it assume SQLalchemy will pick up any issues. It then basically drops those...
Read more >MVC .Net Core Model Validation - The value '' is invalid. Error
In the "Get" Action, I instantiated the object and passed it to the view as the model, even I don't do anything with...
Read more >Model validation in ASP.NET Core MVC | Microsoft Learn
On the server, a required value is considered missing if the property is null. A non-nullable field is always valid, and the [Required] ......
Read more >Training & Test Error: Validating Models in Machine Learning
Calculating any form of error rate for a predictive model is called model validation. As we discussed, you need to validate your models...
Read more >Validate a model—ArcGIS Pro | Documentation
Validating a model checks that all data elements and tool parameter values are valid. ... If the data or value is invalid, an...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi, you have to fork the repo with the button above, near Star/Unstar. You’ll get the latest version of the repo available on GitHub. Then you’ll have to apply changes on the new repo, through cloning or via Github Web UI.
Once done, you’ll have to go to Pull Requests >
New Pull Request
. You’ll get this interface. Click oncompare across forks
and select yours from the right couple of dropdowns, the left one.Once the pull request gets merged, if you want, you can delete your fork as repo.
😊
About your last edit, I think that’s not correct because it would mean that an empty model would still be accepted. 😊
Well, about the NFC, it is a bit a problem for me, as I never tested an NFC pass. As I wrote, I just created the interface to set the properties but never tested. I’ll be happy to try to help you as much as I can.
Thank you!