The reason for this is that the S4 is assuming that you are connecting to an access point with WPA/WPA-2 security, which requires at minimum an 8 character password. If the wifi access point you are connecting to is using the older "WEP" security, then it is possible that the password is less than 8 characters.
I realize that this thread is a bit older and the OP has probably moved on, but here's something you can try if you encounter this issue (keep in mind I don't have access to a WEP network at the moment to test this, but here goes...)
Go into "Settings --> Wi-Fi", and you'll see where it lists the available networks. Do not click on the network you are trying to connect to, instead, scroll all the way to the bottom and click on "Add Wi-Fi Network". Enter the SSID (a.k.a network name), keeping in mind that SSID *are* case sensitive. Under the security field, choose "WEP" (we're making an assumption here because the password is less than 8 characters), then enter the password. You should be able to hit the "Connect" button even if the password is less than 8 characters.
If the network is in fact using WEP, then that should work, but again, I don't actually a way to test at the moment..