@@ 136-150 (lines=15) @@ | ||
133 | * <li>{@link ERROR_INCOMPLETE_FORM} - at least one of required field is empty</li> |
|
134 | * </ul> |
|
135 | */ |
|
136 | function reminder_validate ($reminder_name, $subject_text) |
|
137 | { |
|
138 | debug_write_log(DEBUG_TRACE, '[reminder_validate]'); |
|
139 | debug_write_log(DEBUG_DUMP, '[reminder_validate] $reminder_name = ' . $reminder_name); |
|
140 | debug_write_log(DEBUG_DUMP, '[reminder_validate] $subject_text = ' . $subject_text); |
|
141 | ||
142 | if (ustrlen($reminder_name) == 0 || |
|
143 | ustrlen($subject_text) == 0) |
|
144 | { |
|
145 | debug_write_log(DEBUG_NOTICE, '[reminder_validate] At least one required field is empty.'); |
|
146 | return ERROR_INCOMPLETE_FORM; |
|
147 | } |
|
148 | ||
149 | return NO_ERROR; |
|
150 | } |
|
151 | ||
152 | /** |
|
153 | * Creates new reminder. |
@@ 165-179 (lines=15) @@ | ||
162 | * <li>{@link ERROR_INCOMPLETE_FORM} - at least one of required field is empty</li> |
|
163 | * </ul> |
|
164 | */ |
|
165 | function state_validate ($state_name, $state_abbr) |
|
166 | { |
|
167 | debug_write_log(DEBUG_TRACE, '[state_validate]'); |
|
168 | debug_write_log(DEBUG_DUMP, '[state_validate] $state_name = ' . $state_name); |
|
169 | debug_write_log(DEBUG_DUMP, '[state_validate] $state_abbr = ' . $state_abbr); |
|
170 | ||
171 | if (ustrlen($state_name) == 0 || |
|
172 | ustrlen($state_abbr) == 0) |
|
173 | { |
|
174 | debug_write_log(DEBUG_NOTICE, '[state_validate] At least one required field is empty.'); |
|
175 | return ERROR_INCOMPLETE_FORM; |
|
176 | } |
|
177 | ||
178 | return NO_ERROR; |
|
179 | } |
|
180 | ||
181 | /** |
|
182 | * Creates new state. |