Haxe Code Cookbook


Overview of Haxe code snippets, examples and tutorials tagged with validation.

  • Jan 23, 2018 Abstract types /

     abstract-type ereg validation

    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.‥

  • Jan 23, 2018 Macros /

     expression-macro validation

    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.‥

  • Jan 23, 2018 Macros /

     json validation expression-macro

    Json is quite a strict format. Ensure all comma's and quotes are correct using a macro function, which is executed while compiling.‥