Currently, the UI validation of the include pattern is done against the build name only, not taking under consideration the fact that the actual buildinfo.json is deployed to a path starting with the build name.
So if you add an include pattern with the build name and a wildcard without a '/*' at the end, the relevant build names will be shown in the 'included builds' pane, but the deployment of a build will fail because the include pattern does not include files within the build name folder.
The UI should not reflect the build names in the 'included builds' pane if such an incorrect pattern is inserted.
Steps to reproduce:
1. Deploy some builds named 'freestyle'
2. Create a permission target with build permission include pattern of 'free**'
3. See that the freestyle build name moves to the 'included builds' section.
4. Grant permission to a specific user
5. Upload a build using that user, see that the deployment fails.
6. Update the include pattern to 'free*/'
7. See that the freestyle build is still in the 'included builds' pane.
8. Redeploy the build.