Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

G0.51 - Validation Limit #52

Open
reynoldtan opened this issue Nov 22, 2023 · 0 comments
Open

G0.51 - Validation Limit #52

reynoldtan opened this issue Nov 22, 2023 · 0 comments
Assignees
Labels
Group 0 - General Only for tasks that do not fit in another category.

Comments

@reynoldtan
Copy link
Contributor

Branch

g0.51-Validation-Limit

Groups

Group 0 - General

Describe

A configuration entry will indicate a limit to the number of lines to validate. This is in response to requirements in the current version of allowing a certain number of rows to validate before data import can proceed to the next stage.

Design

image

In this mockup shows a select field that will indicate degree of validation. Possible values include:

  1. Full Validation - All lines/rows in the data file will be validated.
  2. Partial - First Half - Half the total lines.
  3. Partial - First 100 - First 100 lines
  4. Minimum 50 - Validate only 50 lines.

Plugin Value validator will account for this value during validation stage.

public function validate() {
  // Fetch validation degree configuration.
  $validation_limit = x;  
  
  // Begin column and row validation.
  while(($line = fgets($handle) !== FALSE) {
    if ($line_no == 0) {
        // Header row.
        
    }
    else {
      // Data rows.
      // EXIT/STOP validation if line no reaches the configured validation limit.

    }
      $line_no++;
 } 

}

@reynoldtan reynoldtan added the Group 0 - General Only for tasks that do not fit in another category. label Nov 22, 2023
@reynoldtan reynoldtan self-assigned this Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Group 0 - General Only for tasks that do not fit in another category.
Projects
None yet
Development

No branches or pull requests

1 participant