var wmform_121715 = (function() { var scope = {validateAndReturnMessage: null, currentStep: null,aanmelden: null}; with(scope) { aanmelden = (function() { var scope = {wmfragment_1: null,wmfragment_3: null,wmfragment_4: null,huisarts: null,wmfragment_5: null,wmfragment_6: null,wmfragment_7: null,wmfragment_8: null,versturen: null, checkConditions: null, visible: true, validate: null,required_validator: null}; with(scope) { wmfragment_1 = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); wmfragment_3 = (function() { var scope = {persoonlijke_gegevens: null,meisjesachternaam: null,voorletters: null,geboortedatum: null,burgerlijke_staat: null,naam_partner: null,aanspreken_met: null,nationaliteit: null,spreektaal: null,burgerservicenummer: null,bankrekeningnr: null, checkConditions: null, visible: true, validate: null,required_validator: null,date_validator: null,bsn_validator: null}; with(scope) { persoonlijke_gegevens = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); meisjesachternaam = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; required_validator( {"fragment":"meisjesachternaam"}, {"MISSING":"Dit veld is verplicht"} ); return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); voorletters = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; required_validator( {"fragment":"voorletters"}, {"MISSING":"Dit veld is verplicht"} ); return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); geboortedatum = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; required_validator( {"fragment":"geboortedatum"}, {"MISSING":"Dit veld is verplicht"} ); date_validator( {"fragment":"geboortedatum"}, {"ILLEGAL_DATE":"Dit is geen geldige datum"} ); return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); burgerlijke_staat = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; required_validator( {"fragment":"burgerlijke_staat"}, {"MISSING":"Dit veld is verplicht"} ); return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); naam_partner = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); aanspreken_met = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); nationaliteit = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); spreektaal = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); burgerservicenummer = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; required_validator( {"fragment":"burgerservicenummer"}, {"MISSING":"Dit veld is verplicht"} ); bsn_validator( {"fragment":"burgerservicenummer"}, {"INVALID_BSN":"Onjuist burger service nummer (BSN)"} ); return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); bankrekeningnr = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; required_validator( {"fragment":"bankrekeningnr"}, {"MISSING":"Dit veld is verplicht"} ); return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); required_validator = function(parameters, languageLabels) { return ag_121715.required_validator(this, parameters, languageLabels); } date_validator = function(parameters, languageLabels) { return ag_121715.date_validator(this, parameters, languageLabels); } bsn_validator = function(parameters, languageLabels) { return ag_121715.bsn_validator(this, parameters, languageLabels); } } return scope; })(); wmfragment_4 = (function() { var scope = {adres_bereikbaarheidsgegevens: null,adres: null,postcode: null,woonplaats: null,emailadres: null,telefoon_vast: null,telefoon_mobiel: null,telefoon_werk: null, checkConditions: null, visible: true, validate: null,required_validator: null,email_validator: null}; with(scope) { adres_bereikbaarheidsgegevens = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); adres = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; required_validator( {"fragment":"adres"}, {"MISSING":"Dit veld is verplicht"} ); return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); postcode = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; required_validator( {"fragment":"postcode"}, {"MISSING":"Dit veld is verplicht"} ); return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); woonplaats = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; required_validator( {"fragment":"woonplaats"}, {"MISSING":"Dit veld is verplicht"} ); return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); emailadres = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; required_validator( {"fragment":"emailadres"}, {"MISSING":"Dit veld is verplicht"} ); email_validator( {"fragment":"emailadres"}, {"INVALID_EMAIL":"Vul a.u.b. een geldig e-mailadres in"} ); email_validator( {"fragment":"emailadres"}, {"INVALID_EMAIL":"Vul a.u.b. een geldig e-mailadres in"} ); return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); telefoon_vast = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); telefoon_mobiel = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); telefoon_werk = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); required_validator = function(parameters, languageLabels) { return ag_121715.required_validator(this, parameters, languageLabels); } email_validator = function(parameters, languageLabels) { return ag_121715.email_validator(this, parameters, languageLabels); } } return scope; })(); huisarts = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; required_validator( {"fragment":"huisarts"}, {"MISSING":"Dit veld is verplicht"} ); return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); wmfragment_5 = (function() { var scope = {zorgverzekeraar: null,naam: null,polisnummer: null, checkConditions: null, visible: true, validate: null}; with(scope) { zorgverzekeraar = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); naam = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); polisnummer = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); } return scope; })(); wmfragment_6 = (function() { var scope = {eerdere_zwangerschappen: null,is_dit_uw_eerste_zwangerschap: null,hoeveelste_zwangerschap: null,hoeveelste_bevalling: null,hoeveel_kinderen_heeft_u: null,geboortedata_kinderen: null, checkConditions: null, visible: true, validate: null,number_validator: null,number_range_validator: null}; with(scope) { eerdere_zwangerschappen = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); is_dit_uw_eerste_zwangerschap = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); hoeveelste_zwangerschap = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; number_validator( {"fragment":"hoeveelste_zwangerschap"}, {"INVALID_NUMBER":"Vul a.u.b. een getal in"} ); number_range_validator( {"fragment":"hoeveelste_zwangerschap","minimumValue":"null","maximumValue":"null"}, {"NUMBER_OUT_OF_RANGE":"Het ingevulde getal is te klein of te groot"} ); return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); hoeveelste_bevalling = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; number_validator( {"fragment":"hoeveelste_bevalling"}, {"INVALID_NUMBER":"Vul a.u.b. een getal in"} ); number_range_validator( {"fragment":"hoeveelste_bevalling","minimumValue":"null","maximumValue":"null"}, {"NUMBER_OUT_OF_RANGE":"Het ingevulde getal is te klein of te groot"} ); return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); hoeveel_kinderen_heeft_u = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; number_validator( {"fragment":"hoeveel_kinderen_heeft_u"}, {"INVALID_NUMBER":"Vul a.u.b. een getal in"} ); number_range_validator( {"fragment":"hoeveel_kinderen_heeft_u","minimumValue":"null","maximumValue":"null"}, {"NUMBER_OUT_OF_RANGE":"Het ingevulde getal is te klein of te groot"} ); return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); geboortedata_kinderen = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); number_validator = function(parameters, languageLabels) { return ag_121715.number_validator(this, parameters, languageLabels); } number_range_validator = function(parameters, languageLabels) { return ag_121715.number_range_validator(this, parameters, languageLabels); } } return scope; })(); wmfragment_7 = (function() { var scope = {jouw_bevalling: null,uitgerekende_datum: null,plaats_bevalling: null,anders_nl: null,onder_begeleiding_van: null,praktijknaam: null,ziekenhuis: null, checkConditions: null, visible: true, validate: null,required_validator: null}; with(scope) { jouw_bevalling = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); uitgerekende_datum = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; required_validator( {"fragment":"uitgerekende_datum"}, {"MISSING":"Dit veld is verplicht"} ); return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); plaats_bevalling = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); anders_nl = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); onder_begeleiding_van = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); praktijknaam = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); ziekenhuis = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); required_validator = function(parameters, languageLabels) { return ag_121715.required_validator(this, parameters, languageLabels); } } return scope; })(); wmfragment_8 = (function() { var scope = {jouw_kraamtijd: null,jouw_kraamtijd_intro: null,plaats_kraamtijd: null,kraamzorg_thuis: null,kraamhotel_de_meiboom: null,kraamhotel_livive: null,moeder_kind_centrum_: null,aantal_dagen_verblijf: null,begeleiding_kraambed: null,praktijknaam: null,soort_voeding: null,bijzonderheden: null, checkConditions: null, visible: true, validate: null,required_validator: null,number_validator: null,number_range_validator: null}; with(scope) { jouw_kraamtijd = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); jouw_kraamtijd_intro = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); plaats_kraamtijd = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; required_validator( {"fragment":"plaats_kraamtijd"}, {"MISSING":"Dit veld is verplicht"} ); return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); kraamzorg_thuis = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; required_validator( {"fragment":"kraamzorg_thuis"}, {"MISSING":"Dit veld is verplicht"} ); return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); kraamhotel_de_meiboom = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); kraamhotel_livive = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); moeder_kind_centrum_ = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); aantal_dagen_verblijf = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; number_validator( {"fragment":"aantal_dagen_verblijf"}, {"INVALID_NUMBER":"Vul a.u.b. een getal in"} ); number_range_validator( {"fragment":"aantal_dagen_verblijf","minimumValue":"0.0","maximumValue":"8.0"}, {"NUMBER_OUT_OF_RANGE":"Het ingevulde getal is te klein of te groot"} ); return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); begeleiding_kraambed = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); praktijknaam = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); soort_voeding = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); bijzonderheden = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); required_validator = function(parameters, languageLabels) { return ag_121715.required_validator(this, parameters, languageLabels); } number_validator = function(parameters, languageLabels) { return ag_121715.number_validator(this, parameters, languageLabels); } number_range_validator = function(parameters, languageLabels) { return ag_121715.number_range_validator(this, parameters, languageLabels); } } return scope; })(); versturen = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); required_validator = function(parameters, languageLabels) { return ag_121715.required_validator(this, parameters, languageLabels); } } return scope; })(); currentStep = function() { return aanmelden; }; validateAndReturnMessage = function(inputName,value) { var fragmentObj = getObject(currentStep(),inputName); if (fragmentObj != null) { fragmentObj.value = value; return fragmentObj.validate(); } }; getObject = function(obj, expression) { if (typeof obj != 'undefined' && obj != null) { var index = expression.indexOf('.'); if (index == -1) { return obj[expression]; } else { return getObject(obj[expression.substring(0,index)],expression.substring(index+1, expression.length)); } } else { return null; } } } return scope; })(); if (typeof WebmanagerFormStateRegistry != 'undefined') { if (typeof WebmanagerFormStateRegistry['wmform_121715'] == 'undefined' || !WebmanagerFormStateRegistry['wmform_121715']) { WebmanagerFormStateRegistry['wmform_121715'] = wmform_121715; }; }; ag_121715 = new Object(); ag_121715.required_validator = function(scope,parameters, languageLabels) { if (scope[parameters.fragment].value == undefined || scope[parameters.fragment].value === "") { scope[parameters.fragment].errors["MISSING"] = languageLabels["MISSING"]; } } ag_121715.date_validator = function(scope,parameters, languageLabels) { var dateValue = scope[parameters.fragment].value; if (dateValue != undefined && dateValue != "") { dateValue = dateValue.replace(/-/gi, '/'); splitted = dateValue.split('/'); if (splitted.length == 3) { dd = splitted[0]; mm = splitted[1]; yyyy = splitted[2]; var d = new Date(mm + "/" + dd + "/" + yyyy); isDate = (d.getMonth() + 1 == mm && d.getDate() == dd && d.getFullYear() == yyyy); if (!isDate) { scope[parameters.fragment].errors["ILLEGAL_DATE"] = languageLabels["ILLEGAL_DATE"]; } } else { scope[parameters.fragment].errors["ILLEGAL_DATE"] = languageLabels["ILLEGAL_DATE"]; } } } ag_121715.bsn_validator = function(scope,parameters, languageLabels) { // retrieve BSN value var bsn = scope[parameters.fragment].value; // check whether it is not empty if (bsn==undefined || bsn=="" || (typeof(bsn.trim)=="function" && bsn.trim()=="")) { // that's fine; scope case should be handled by the required validator return; } // remove all gibberish bsn = bsn.replace(/\./gi, ''); // remove all dots bsn = bsn.replace(/\s/gi, ''); // remove all whitespace bsn = bsn.replace(/,/gi, ''); // remove all commas // check for any non numeric values; they should not be here! if (bsn.match(/[^0-9]/)) { scope[parameters.fragment].errors["INVALID_BSN"] = languageLabels["INVALID_BSN"]; return; } // check the length; it should always be 9 if (bsn.length==8) { bsn = "0" + bsn; } else if (bsn.length!=9) { scope[parameters.fragment].errors["INVALID_BSN"] = languageLabels["INVALID_BSN"]; return; } var total = 0; for(i=0; i<9; i++) { var digit = parseInt(bsn.substring(i, i+1)); if (i<8) { total += digit * (9-i); } else { // In the BSN elfcheck, the last number is a control number - subtract it instead of adding it total -= digit * (9-i); } } if (total%11 == 0) { scope[parameters.fragment].value = bsn; return; } scope[parameters.fragment].errors["INVALID_BSN"] = languageLabels["INVALID_BSN"]; return; } ag_121715.email_validator = function(scope,parameters, languageLabels) { var myExpression = /^[a-zA-Z0-9][\w\.\-+]*@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$/; if (scope[parameters.fragment].value != undefined && scope[parameters.fragment].value != "" && !myExpression.test(scope[parameters.fragment].value)) { scope[parameters.fragment].errors["INVALID_EMAIL"] = languageLabels["INVALID_EMAIL"]; } } ag_121715.number_validator = function(scope,parameters, languageLabels) { if (scope[parameters.fragment].value != undefined && scope[parameters.fragment].value !== "") { var value = scope[parameters.fragment].value + ''; if (!value.match(/^-{0,1}[0-9]+\.?[0-9]*$/)) { scope[parameters.fragment].errors["INVALID_NUMBER"] = languageLabels["INVALID_NUMBER"]; } else { scope[parameters.fragment].value = parseFloat(value); } } } ag_121715.number_range_validator = function(scope,parameters, languageLabels) { if (scope[parameters.fragment].value != undefined && scope[parameters.fragment].value !== "") { value = scope[parameters.fragment].value; minValue = parseFloat(parameters.minimumValue); maxValue = parseFloat(parameters.maximumValue); if (parameters.minimumValue != '') { if (value < minValue) { scope[parameters.fragment].errors["NUMBER_OUT_OF_RANGE"] = languageLabels["NUMBER_OUT_OF_RANGE"]; } } if (parameters.maximumValue != '') { if (value > maxValue) { scope[parameters.fragment].errors["NUMBER_OUT_OF_RANGE"] = languageLabels["NUMBER_OUT_OF_RANGE"]; } } } }