Skip to content

Instantly share code, notes, and snippets.

@kevindb
Created August 6, 2014 17:42
Show Gist options
  • Save kevindb/93245717e29a26fe792c to your computer and use it in GitHub Desktop.
Save kevindb/93245717e29a26fe792c to your computer and use it in GitHub Desktop.
CF GUID
public string function getGuid(){
return insert("-", createUUID(),23);
}
public boolean function getIsGuid(
required string guid
){
return isValid("regex", arguments.guid,"^[a-fA-F\d]{8}-([a-fA-F\d]{4}-){3}[a-fA-F\d]{12}$");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment