* applicable law or agreed to in writing, software distributed under the License is * distributed on an "AS IS" BASIS, WITHOUT ANY WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific language governing * permissions and limitations under the License. You may obtain a copy of the License * at <http://corebos.org/documentation/doku.php?id=en:devel:vpl11> ************************************************************************************************* * Module : Example Validation * Version : 1.0 * Author : JPL TSolucio, S. L. *************************************************************************************************/ /*********************************************************************************** param structure array contains all the form fields current values, the ones you want to validate return %%%OK%%% to indicate that all validations have passed correctly %%%CONFIRM%%% followed by any message to produce a screen that will ask for confirmation using the text following the CONFIRM label Any other message will be interpreted as an error message that will be shown to user. ************************************************************************************/ global $log, $currentModule, $adb; include_once 'include/validation/load_validations.php'; $screen_values = json_decode($_REQUEST['structure'], true); $v = new cbValidator(array('iban_number' => $screen_values['iban_number'])); $v->rule('required', 'iban_number'); $v->rule('IBAN_BankAccount', 'iban_number'); if ($v->validate()) { echo "Yay! We're all good!"; } else { // Errors print_r($v->errors()); } //echo '%%%OK%%%';