Techno1Monkey
Techno1Monkey
NNuxt
Created by Techno1Monkey on 6/18/2024 in #❓・help
i18next acting weird
this is what I use
4 replies
NNuxt
Created by Techno1Monkey on 6/18/2024 in #❓・help
i18next acting weird
<input
v-model="password"
required
type="password"
:placeholder="$t(('login.password'))"
id="password"
/>
<input
v-model="password"
required
type="password"
:placeholder="$t(('login.password'))"
id="password"
/>
4 replies
NNuxt
Created by Techno1Monkey on 4/8/2024 in #❓・help
Regex not working from prop
Alright so I got it working, but it still always return false...
<script setup>
const props = defineProps(['format', 'message', 'value']);

const { format } = toRefs(props);

function checkValid(){
if (!props.format || !props.value || (props.value.length < 4)) {
return true;
}

const regex = new RegExp(format.value);
console.log(regex.test(props.value))

return regex.test(props.value);
}
</script>
<script setup>
const props = defineProps(['format', 'message', 'value']);

const { format } = toRefs(props);

function checkValid(){
if (!props.format || !props.value || (props.value.length < 4)) {
return true;
}

const regex = new RegExp(format.value);
console.log(regex.test(props.value))

return regex.test(props.value);
}
</script>
5 replies
NNuxt
Created by Techno1Monkey on 4/8/2024 in #❓・help
Regex not working from prop
Could you be a little more specific? I'm trying something like this but this doesn't work:
<script setup>
const props = defineProps(['format', 'message', 'value']);

const { test } = toRefs(props.format);

function checkValid(){
if (!props.format || !props.value || (props.value.length < 4)) {
return true;
}

const regex = new RegExp(test);
console.log(regex.test(props.value))
return regex.test(props.value);
}
</script>
<script setup>
const props = defineProps(['format', 'message', 'value']);

const { test } = toRefs(props.format);

function checkValid(){
if (!props.format || !props.value || (props.value.length < 4)) {
return true;
}

const regex = new RegExp(test);
console.log(regex.test(props.value))
return regex.test(props.value);
}
</script>
5 replies
NNuxt
Created by Techno1Monkey on 4/8/2024 in #❓・help
[RESOLVED] Component children
Alright thanks.
3 replies