This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Function to validate input is not empty | |
| validate_input() { | |
| local input=$1 | |
| local field_name=$2 | |
| if [ -z "$input" ]; then | |
| echo "Error: $field_name cannot be empty" | |
| exit 1 | |
| fi |