SourceForge: erlangweb/erlangweb: changeset 236:d93c728f6652
merged changes eptic-1.3 1.3rc1
authormichal.ptaszek
Mon Apr 27 12:54:58 2009 +0200 (7 months ago)
brancheptic-1.3
changeset 236d93c728f6652
parent 234e9240f06a38b
parent 235c039b0a665ca
child 2371643b473570e
merged changes
     1.1 --- a/lib/wpart-1.3/src/wpart_valid.erl	Mon Apr 27 11:11:07 2009 +0200
     1.2 +++ b/lib/wpart-1.3/src/wpart_valid.erl	Mon Apr 27 12:54:58 2009 +0200
     1.3 @@ -16,12 +16,12 @@
     1.4  %%%-------------------------------------------------------------------
     1.5  %%% File    : wpart_valid.erl
     1.6  %%% Author  : Michal Zajda <michal.zajda@erlang-consulting.com>
     1.7 -%%% Description : 
     1.8 -%%%
     1.9 +%%% Description : Validation of custom types by dividing them into basic types 
    1.10 +%%%               and routing to the validate function in proper wtypes
    1.11  %%%-------------------------------------------------------------------
    1.12  
    1.13  -module(wpart_valid).
    1.14 --export([validate/1, is_private/1]).
    1.15 +-export([validate/1, validate/3, is_private/1]).
    1.16  
    1.17  
    1.18  %% @doc the initial call from a controller
    1.19 @@ -40,7 +40,7 @@
    1.20  
    1.21  %% @doc Function validates field by field from a record definition, when field aprears 
    1.22  %% to be nested type its predessor is formed and passed with TypeName
    1.23 --spec(validate/5 ::  (atom()|list(), list(), list(tuple()), list(), integer()) ->
    1.24 +-spec(validate/5 ::  (undefined|list(), list(), list(tuple()), list(), integer()) ->
    1.25  	     {integer(),list(tuple())}).
    1.26  validate(_, _, [[]], Acc, ErrorCount) ->
    1.27      {ErrorCount,Acc};
    1.28 @@ -158,3 +158,8 @@
    1.29  	false -> 
    1.30  	    false
    1.31      end.
    1.32 +
    1.33 +
    1.34 +%% @doc back compatibility function.
    1.35 +validate(_,_,_) ->
    1.36 +    depricated.