Haxe Code Cookbook

validation

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

  • Jan 03, 2017 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 03, 2017 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 03, 2017 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.‥