Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Validation fixes #1900
Thanks for offering these changes @TBK.
I like the standardising on a single image rules validation message, I can only think it's a mistake that I've left it in two places. We should probable remove the method from the ImageRepo completely to stop future duplication.
In regards to the other changes, Have you figured out exactly what these fix? I'd rather not touch the rules unless I can understand what they fix, even if only to be able to write tests for to prevent happening again.
I have changed
nullable allows the field to be empty on validation.
With my setup without the changes I can not change the app logo, profile picture or create a shelf/book without an image.
I have also removed getImageValidationRules() from ImageRepo.
Thanks again @TBK for these updates.
Have given them a test on my environment and all seems good. I do try to cover any back-end issues with automated tests but, since these issues only occurred in a specific environment, I have been unable to do that here so BookStack on your environment may be a little less stable than others as changes are made but I'm happy to support such updates as this where needed.