validation
Overview of Haxe code snippets, examples and tutorials tagged with validation.
Apr 13, 2016 Abstract types / Email address as abstract type
The following EmailAddress Abstract type example is based on the underlying standard String type, but sets the restriction that it can only represent a valid email address. If not, an exception will be thrown.‥
Mar 22, 2016 Macros / Validates a .JSON file compile-time
Json is quite a strict format. Ensure all comma's and quotes are correct using a macro function, which is executed while compiling.‥
Mar 23, 2016 Macros / Assert macro that shows sub-expression values
Sometimes failed assertion checks make it difficult to tell what went wrong. For debugging the programmer not only wants to know that a check failed, but also why it failed. This macro outputs the values of all sub-expressions.‥