Overview of Haxe code snippets, examples and tutorials tagged with validation.
Dec 15, 2017 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.‥
Dec 15, 2017 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.‥
Dec 15, 2017 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.‥