This file contains 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
// Documentation: https://www.sozialversicherungsnummer.ch/aufbau-neu.htm | |
function isValidAHVNumber(ahvNumber) { | |
// Remove dots from the AHV number | |
let cleanedAhvNumber = ahvNumber.replace(/\./g, ''); | |
if (!/^\d{13}$/.test(cleanedAhvNumber)) { | |
return false; // Checks if the AHV number is exactly 13 digits after removing dots | |
} |
This file contains 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
// Age calculator | |
// 1. First take a Date picker & a text input field | |
// 2. In the text input element, add the element class 'age' | |
// 3. Add a custom element class 'date' in the date picker, then add the following js in your fluent form custom js | |
jQuery( ".date" ).change(function() { | |
var age = getAge(jQuery(this).val()) |
This file contains 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 | |
# | |
# Copyright (c) 2018 Stephan Rickauer <stephan@rickauer.com> | |
# | |
# Permission to use, copy, modify, and distribute this software for any | |
# purpose with or without fee is hereby granted, provided that the above | |
# copyright notice and this permission notice appear in all copies. | |
# | |
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |