Skip to content

Commit

Permalink
feat: add a text section about rules in config
Browse files Browse the repository at this point in the history
  • Loading branch information
lekotros committed May 9, 2022
1 parent 67971c0 commit 4324780
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 8 additions & 0 deletions app/components/ValidationConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,14 @@ const ValidationConfig = (props: ValidationConfigProps) => {
</Select>
</FormControl>

<Typography variant="h4">Rules</Typography>
<Typography><b>2.</b> In addition to the schema validation, we have also included a couple of optional rules that validate the consistency of the documents (work in progress)</Typography>
<Typography>
<ul style={{ marginTop: 0 }}>
<li>Frame defaults - Verifies the validity of the <Typography variant="caption" component="span">{'<FrameDefaults />'}</Typography> elements.</li>
<li>Stop point names - Checks that each <Typography variant="caption" component="span">{'<ScheduledStopPoint />'}</Typography> contain a valid <Typography variant="caption" component="span">{'<Name />'}</Typography>.</li>
</ul>
</Typography>
<FormControl>
<InputLabel id="rules-label">Rules</InputLabel>
<Select
Expand Down
1 change: 0 additions & 1 deletion builtin/frame_defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ function main(ctx) {
}

if (!validLanguage(ctx.xpath.findValue(defaultLangPath, defaultLocale))) {
ctx.log.debug(line)
errors.push({
type: "consistency",
message: "Invalid DefaultLanguage",
Expand Down

0 comments on commit 4324780

Please sign in to comment.