Skip to content
Snippets Groups Projects
  • William Roberts's avatar
    696a66ba
    checkseapp: generalize input validation · 696a66ba
    William Roberts authored
    
    Input validation was hard-coded into a validation routine
    that would check against type and key names in a scattered,
    order dependent conditional code block.
    
    This makes it harder than it should be to add new key value
    pairs and types into checkseapp.
    
    To correct this, we add a validation callback into the
    static mapping. If the validation callback is set, the
    existing validation routine will call this for input
    validation. On failure, a validation specific error message
    is returned to be displayed.
    
    Change-Id: I92cf1cdf4ddbcfae19168b621f47169a3cf551ac
    Signed-off-by: default avatarWilliam Roberts <william.c.roberts@intel.com>
    696a66ba
    History
    checkseapp: generalize input validation
    William Roberts authored
    
    Input validation was hard-coded into a validation routine
    that would check against type and key names in a scattered,
    order dependent conditional code block.
    
    This makes it harder than it should be to add new key value
    pairs and types into checkseapp.
    
    To correct this, we add a validation callback into the
    static mapping. If the validation callback is set, the
    existing validation routine will call this for input
    validation. On failure, a validation specific error message
    is returned to be displayed.
    
    Change-Id: I92cf1cdf4ddbcfae19168b621f47169a3cf551ac
    Signed-off-by: default avatarWilliam Roberts <william.c.roberts@intel.com>