如何在cakephp appmodel中的beforevalidate方法中应用修剪

时间:2014-06-06 08:20:57

标签: cakephp cakephp-2.0 cakephp-1.3 cakephp-2.1 cakephp-2.3

我使用cakephp框架,因为我发布父和子模型数据,但我想从中删除triming。我的演示代码是

Array
(
    [Currency] => Array
        (
            [Code] =>         fgfg
            [Name] => fg
            [Description] => 
            [NoOfDecimalPrecision] => 3
            [CurrencyName] => bnjmhj
            [CurrencySymbol] => hjh
            [DecimalPrecisionName] => bjmh
            [DecimalPrecisionSymbol] => 
            [CurrencyScaleType_058] => 368
            [IsPrefixSymbol] => 0
            [IsInActive] => 0
            [IsExchangeCurrency] => 0
            [RevisionNumber] => 
        )

    [CurrencyDenomination] => Array
        (
            [0] => Array
                (
                    [LineNo] => 1
                    [RowState] => 435
                    [DenominationName] =>          jhgjk
                    [DenominationDetails] => kgk
                    [DenominationValue] => 1
                    [RevisionNumber] => 1
                    [DenominationSequence] => 1
                )

        )

)

我的代码货币是子模型中的父模型和货币抵消,所以我想要两种情况。我的数据发布dyanamic而不是static.so请建议解决方案。

0 个答案:

没有答案